Selenium RC popup question

My web page sends information to the page, and the response returns a popup. Does anyone have an idea on how I can verify the information in a popup?

The popup does not have WindowId, and I cannot get the popup using selenium.GetWindow("popuwindowname"), selenium.GetWindow("title=something")or selenium.GetWindow("name=popupwindowname").

Someone had a similar problem and found a workaround or an alternative solution?

+3
source share
3 answers

Can you put the html source of the popup. Usually what you see on the screen may differ in the html code.

0
source

, selenium . javascripts . .

0

try it

public void testPopup() throws Exception {
    selenium.open("http://yoursitename/page.aspx");
    selenium.click("//img[@alt='Share']");
    selenium.waitForPopUp("_blank", "30000");
    selenium.selectPopUp("");
    verifyTrue(selenium.isTextPresent("Recommend to a friend"));
    selenium.close();

Hope will help you!

0
source

Source: https://habr.com/ru/post/1733588/


All Articles