ElementNotSelectableException not defined in errors.py

RESOLVED DUPLICATE of bug 1154691

Status

Testing
Marionette
RESOLVED DUPLICATE of bug 1154691
4 years ago
3 years ago

People

(Reporter: whimboo, Unassigned, Mentored)

Tracking

({ateam-marionette-client})

Trunk
ateam-marionette-client
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(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.
Keywords: ateam-marionette-client
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

Comment 4

3 years ago
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
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1154691
You need to log in before you can comment on or make changes to this bug.