In https://github.com/puppeteer/replay/issues/268 there is currently an example outlined that projects can use for demo purposes. This example doesn't work with this extension for the following reasons:
calling await browser.$("[data-test=Americano]").click() fails as the checkout element overlays the click position, I created an issue in the WebDriver spec suggesting that elements should be scrolled into the center of the view rather than to the end to increase the likelyhood to not run into this situation
~into the following WebdriverIO selector button=Add one Espresso which translates this WebDriver xPath: .//button[normalize-space() = "Add one Espresso"], unfortunately the button has an aria label and its text is just a + which means that the aria label takes precedence and finding the element by text won't work.~
Both issues can be solved by:
always scroll the element into the center of the view via:
but this would make the test script very verbose and doesn't guarantee it is solved in all occasions.
~we could make an exemption to use "find by element text" for buttons and just use the CSS selector provided by @puppeteer/replay, unfortunately that selector also doesn't work for us~
In https://github.com/puppeteer/replay/issues/268 there is currently an example outlined that projects can use for demo purposes. This example doesn't work with this extension for the following reasons:
await browser.$("[data-test=Americano]").click()
fails as the checkout element overlays the click position, I created an issue in the WebDriver spec suggesting that elements should be scrolled into the center of the view rather than to the end to increase the likelyhood to not run into this situation~into the following WebdriverIO selector
button=Add one Espresso
which translates this WebDriver xPath:.//button[normalize-space() = "Add one Espresso"]
, unfortunately the button has an aria label and its text is just a+
which means that the aria label takes precedence and finding the element by text won't work.~Both issues can be solved by:
but this would make the test script very verbose and doesn't guarantee it is solved in all occasions.
@puppeteer/replay
, unfortunately that selector also doesn't work for us~Edit: The second problem was solved by introducing an accessibility name selector to WebdriverIO