webdriverio / recorder-extension

WebdriverIO Extension for Devtools that allows you to export tests directly from the Recorder panel.
https://webdriver.io
MIT License
10 stars 4 forks source link

Do we need to add step to scroll to off-viewport element before the action? #6

Closed jecfish closed 2 years ago

jecfish commented 2 years ago

Steps:

  1. Import this JSON file in Recorder. https://github.com/puppeteer/replay/issues/268
  2. Export it as WebDriverIO script.
  3. Run it with chrome driver.
  4. The script failed at the step: click Americano. [NOT OK] Element is not clickable at point x y. Other element would receive the click: ...
  5. Repeat step 2 and 3.
  6. Manually scroll down to Americano.
  7. The "click Americano" step run successfully.

Notes:

Follow the side note in the https://webdriver.io/docs/api/element/click. I am not sure if this is something can be addressed by the auto-generated script or should I manually remove the fixed header menu.

christian-bromann commented 2 years ago

The WebDriver spec defines that interacting with elements requires to scroll the element into viewport. However that sometimes is not reliable when e.g. there are position fixed elements overlaying the element. I will investigate this.

christian-bromann commented 2 years ago

I tweaked and improved the selectors a bit and this doesn't seem to be a problem anymore.