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

1 Answer

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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.