Share
Go down
Amit Chhikara
Active particpant
Active particpant
Posts : 10
Join date : 2012-01-03

Unable to capture A POP Window??

on Fri Jun 15, 2012 2:27 pm
Code:

selenium.click("//input[@value='Add an administrator']");
/*Get the pop up window ID. */
String feedWinId = selenium.getEval("{var windowId; for(var x in selenium.browserbot.openedWindows ) {windowId=x;} }");
selenium.selectWindow(feedWinId);
System.out.println(feedWinId);
selenium.windowFocus();

selenium.type("id=lookup", "amit");
selenium.click("//input[@value='Lookup']");
try
{
assertTrue(selenium.isTextPresent("Enter a valid email address."));
}
catch(Throwable t)
{
System.out.println(t);
}

This code is enable to capture the pop up window and perform the action on pop up.
Back to top
Permissions in this forum:
You cannot reply to topics in this forum