testing-library / webdriverio-testing-library

🕷️ Simple and complete WebdriverIO DOM testing utilities that encourage good testing practices.
16 stars 14 forks source link

fix: queries when Simmer cannot create selector #17

Closed olivierwilkinson closed 3 years ago

olivierwilkinson commented 3 years ago

When Simmer fails to create a unique selector, usually because it would need to go to a higher depth than 3 to generate it, queries will fail.

Simmer was added to allow refetching of elements when they become stale but if it fails it would be better to fallback to using WebElement JSONs to create the WebdriverIO.Element instances so that the queries don't fail. When falling back to using WebElement JSONs refetching elements won't be possible anymore.

Maybe in future we want to allow users to configure Simmer themselves so that they can set the depth etc. We may also want to add an info log at some point.

github-actions[bot] commented 3 years ago

:tada: This PR is included in version 3.0.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: