Closed Bug 1061698 Opened 5 years ago Closed 4 years ago

Need ability to work in the shadow root/shadow DOM

Categories

(Testing :: Marionette, defect, P2)

x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1194224

People

(Reporter: zcampbell, Unassigned)

References

()

Details

(Keywords: pi-marionette-client, pi-marionette-server, pi-marionette-spec, Whiteboard: [affects=gaia])

Attachments

(1 file, 1 obsolete file)

Gaia devs are starting to mix visible UI elements in the main DOM and the shadow DOM in the same app.

Marionette can't see the elements in the shadow DOM so we need to guess the location and tap using coordinates where we think the element lies, it's a bit hacky.

We should look to implement the shadow dom stuff in marionette:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=22987
Priority: -- → P2
Whiteboard: [affects=gaia]
Attachment #8521373 - Flags: review?(robert.chira)
Attachment #8521373 - Flags: review?(florin.strugariu)
Sorry, I added the patch to the wrong bug. 

Do we have any updates on this issue?
Test test_cost_control_data_alert_mobile.py (smoketest) is disabled because of it.
Attachment #8521373 - Flags: review?(robert.chira)
Attachment #8521373 - Flags: review?(florin.strugariu)
Blocks: 1097605
Attachment #8521373 - Attachment is obsolete: true
I tried something and I got stuck of course, because I don't really know what's going around this code.

I keep getting this error: 
TEST-UNEXPECTED-ERROR | test_findelement.py TestElements.test_shadowroot | MarionetteException: MarionetteException: {u'message': u'Marionette does not recognize the packet type "getElementShadowRoots"', u'error': u'unrecognizedPacketType'}


If someone could give me info on what needs to be done here, that might be helpful.
Andrew or Malini, you have perhaps ideas on how to tackle this?
Flags: needinfo?(mdas)
Flags: needinfo?(ahalberstadt)
(In reply to Martijn Wargers [:mwargers] (QA) from comment #3)
> Created attachment 8534085 [details] [diff] [review]
> getshadowroots.diff
> 
> I tried something and I got stuck of course, because I don't really know
> what's going around this code.
> 
> I keep getting this error: 
> TEST-UNEXPECTED-ERROR | test_findelement.py TestElements.test_shadowroot |
> MarionetteException: MarionetteException: {u'message': u'Marionette does not
> recognize the packet type "getElementShadowRoots"', u'error':
> u'unrecognizedPacketType'}
> 
> If someone could give me info on what needs to be done here, that might be
> helpful.

You need to add your listener to the packet list: http://dxr.mozilla.org/mozilla-central/source/testing/marionette/marionette-server.js#2835
Did ato's comment help? I'm not all that familiar with the shadow dom, so I'd have to do some research before I had anything intelligent to say.
Flags: needinfo?(ahalberstadt)
do as ato suggested and also do the same in marionette-listener.js.

also, are you following the proposed spec for this?
Flags: needinfo?(mdas) → needinfo?(martijn.martijn)
David, probably not, at this point I'm not really capable of writing a patch for this bug, that's why I haven't assigned myself to this bug. But still, I can always try!
Flags: needinfo?(martijn.martijn)
In: http://mxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/apps/contacts/regions/contact_details.py#103
Instead of using: el.tap(25, 25)
We could use this:
self.marionette.execute_script("arguments[0].shadowRoot.querySelector('button[icon=\"back\"]').click()", [el])
But I'm not sure if that would buy us anything.
This was done in bug 1194224, thanks to Yura. I'll add the dependancies there.
No longer blocks: 1093585, 1094139, 1097605
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1194224
You need to log in before you can comment on or make changes to this bug.