'GWEN - Intermittent issue in finding web element in Gwen framework even after wait conditions
I am using GWEN automation framework to test our web application
Code:
And dropdown value can be located by xpath "//[@class='scrollingMenu' or @class='pickListMenu' or @role='listbox'][contains(@style,'visibility: inherit')]//[text()[normalize-space()="ABC"]]"
And I wait for dropdown value
And I click dropdown value
Error:
Could not locate element: dropdown value [locator: xpath=//[@class='scrollingMenu' or @class='pickListMenu' or @role='listbox'][contains(@style,'visibility: inherit')]//[text()[normalize-space()="ABC"]]]
Why it is happening intermittently and working most of the time
Solution 1:[1]
Dynamically rendered elements are best located by JavaScript. Either convert your locator to a JS equivalent or try enabling the implicit JS locator mechanism. See https://gweninterpreter.org/docs/advanced/implicit-js-locators
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Branko Juric |
