@a.sharapova showed us, the URL of the target web app. That is
I looked at this page with Chrome DevTools, and found that the HTML of this site is a hard one for UI testers and E2E test tools.
You should look at this site in detail using Chrome Dev Tools. Using DevTools, Please try to find the element, of which XPath is
//*[@id="mobileMenuWrap"]/nav/ul/li[5]/ul/li[2]/ul[contains(@class,'dropdown-menu')]
. Yes, the element is found in the DOM. However, that element has CSS property visiblitiy
with value of hidden
.
As long as the element has the visiblity of value hidden
, @a.sharapova, you will certainly encounter the “element not interactable” error and would never be able to click that element by test scripts.
@a.sharapova wrote
WebUI.focus(findTestObject('OformlenieZakaza/Navigation/2Katalong/2-2-rozet'))
I suppose that he/she did this to turn the visibility
property from “hidden” to “visible” by calling WebUI.focus()
. However I thought that WebUI.focus()
is not enough; he/she needs WebUI.click()
and WebUI.waitForElementVisible()
. So I tried to examine it. When I tried clicking the [Katalog]
menu, to my surprise, I was forced to jump to another URL. In other words, I could not turn a dropdown menu in that page visible.
So I gave up.
@a.sharapova
Do you desperately want to click the <a>
element of xpath //*[@id=“mobileMenuWrap”]/nav/ul/li[5]/ul/li[2]/ul/li[2]/a
?
To me, it looks impossible, as the HTML forces you not to do it.
I guess, you are just learning & playing on the page; you might not necessarily stick to clicking that element. — then, you should just give it up. Forget it. And look at other issues.