wswebcreation / webdriver-image-comparison

MIT License
43 stars 35 forks source link

Multiple element selector only hiding first match #66

Closed wswebcreation closed 4 years ago

wswebcreation commented 4 years ago

Originally logged here https://github.com/wswebcreation/wdio-image-comparison-service/issues/35

Describe your question with as much detail as possible

Hiding only one of the elements matching a selector when updating to puppeteer. It seems the removal/hidden elements is passed through all the way to the client script but I have been having trouble debugging where exactly it might break. My question is basically do I need to debug a visual Chrome execution to get access to the client script logic?

My selector is something like browser.$$('[data-thing="MULTIPLE"]') and I make sure they are all displayable elements before sending them in. When in puppeteer we are getting HTMLElements or are they still WebElements?

If it's about a specific piece of code, try and include some of it to support your question.

https://github.com/wswebcreation/webdriver-image-comparison/blob/master/lib/clientSideScripts/hideRemoveElements.ts#L30

Environment (please complete the following information):

Additional context Add any other context about the problem here.