Closed Bug 1128513 Opened 10 years ago Closed 9 years ago

ElementNotSelectableException not defined in errors.py

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1154691

People

(Reporter: whimboo, Unassigned, Mentored)

Details

(Keywords: pi-marionette-client, Whiteboard: [good first bug][lang=py])

If you want to access an attribute via get_attribute() which does not exist on the given element, an ElementNotSelectableException is thrown: https://dxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/marionette.py#686 This exception should be part of of the errors.py module but it is not listed there at all. Not sure where this class is actually defined. https://dxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/errors.py
So as it looks like the client code fails to raise the exception because its undefined. Here the traceback: File "/mozilla/code/firefox/inbound/testing/marionette/client/marionette/marionette.py", line 687, in _handle_error raise errors.ElementNotSelectableException(message=message, status=status, stacktrace=stacktrace) AttributeError: 'module' object has no attribute 'ElementNotSelectableException'
For context, the server relies on the Selenium atoms for this, so you won't find the ElementNotSelectableError defined in the implementation of getElementAttribute either.
Whiteboard: [good first bug][lang=py]
Short testcase for this issue: with self.marionette.using_context('chrome'): tabs = self.marionette.find_elements('id', 'tabbrowser-tabs') tabs[0].get_attribute('class') # works tabs[0].get_attribute('selected') # fails
I would like to take this bug.
Chris, this is now assigned to you. All the details to get started are in comment 0. Let me know how you get on.
Assignee: nobody → csg35
resetting assignee as no action
Assignee: csg35 → nobody
Mentor: dburns
Hi, i would like to work on this bug. Also I have a little doubt, are the links in comment 0 correct? I found errors.py and marionette.py in this directory: https://dxr.mozilla.org/mozilla-central/source/testing/marionette/driver/marionette_driver and not in the one mentioned above.
(In reply to Shruti Jasoria [:ShrutiJ] from comment #7) > Also I have a little doubt, are the links in comment 0 correct? I found > errors.py and marionette.py in this directory: > > https://dxr.mozilla.org/mozilla-central/source/testing/marionette/driver/ > marionette_driver Yes, that’s correct.
This got actually fixed via bug 1154691.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.