Answer the question
In order to leave comments, you need to log in
How to use autotest to click on a button on a popup that appears when you click on an element and disappears when you move the mouse away from it?
I am writing an autotest in Selenium WebDriver + C# to follow a link when clicking on a button located on a popup (I find elements using a CSS locator).
Popup appears when you click on a certain element.
This popup disappears if you move the mouse cursor away from it.
When you try to click on the button using the click() method, the popup disappears and the autotest clicks on the element that was located behind the popup.
I tried to go through Actions using moveToElement().ckick().build().perform(), as a result, popup just disappears and an exception is thrown ("element not found").
I also tried to click using JavaScript Excecutor, it worked, but it throws it to the top of the current page, and does not follow the link.
Everything works manually.
Answer the question
In order to leave comments, you need to log in
I don’t know how to do it exactly the way you want, but you can cheat a little and decide differently:
1) call popup, check that it has opened and that the button is in place
2) just use the webdriver to follow the url to which the button should lead
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question