Closed ohaibbq closed 3 years ago
Hi there, sorry for not responding sooner!
I have been working on this in the background and have raised a PR that I hope will fix the problem. It adds SimmerJS to the project to create a unique selector for the elements found by dom-testing-library, then those selectors can be used to create a WebdriverIO.Element instead of using WebElement JSONs directly. This seems to be a fairly reliable solution that is being employed by nigthwatch-testing-library.
Let me know if it fixes your tests also and then I'll close this issue 😄
Edit: the fix has been released in v2.1.2. Since it was passing the failing test-case I figured it was a safe bet but I'm going to leave the issue open so you can let me know if you are still having problems. 👍
I'm going to close this issue since I think it's resolved. @ohaibbq let me know if you are still finding problems and I will reopen it 😄
Our tests fail when trying to click elements that need to be re-fetched as a result of stale element exceptions. WebdriverIO attempts to build a list of selectors to re-locate the element, but elements selected by
@testing-library/webdriverio
have no selectors associated.Here is a failing test-case that is borrowed from WebdriverIO: