Closed
Bug 1217826
Opened 9 years ago
Closed 7 years ago
Create a decorator to facilitate the use of switch_to_shadow_root()
Categories
(Firefox OS Graveyard :: Gaia::UI Tests, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: jlorenzo, Unassigned)
Details
There's likely a way to prevent one person to forget about the shadow_root switching. We can define a python decorator, this way:
```py
@WebComponent
class MyWebComponent(Widget):
def do_something_inside_the_shadow_dom(self):
# no call to switch_to_shadow_root at all
self.marionette.find_element(...)
# and so on
```
and the decorator would be defined, likely this way:
```py
class WebComponent(decorator):
# for each function of the class decorated:
# before the function is called => switch to the root_element
# after => switch back to the original context
```
Comment 1•7 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•