- Amit ChhikaraActive particpant
- Posts : 10
Join date : 2012-01-03
Unable to capture A POP Window??
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.
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.
- Unable to capture javascript error msg
- unable to capture onChange event handler
- Issues with IE close browser, Firefox window focus. unable to get screenshots any browser
- Unable to find element on closed window on IE 11
- how can call this class "x-window-header x-window-header-noborder x-unselectable x-window-draggable" from webdriver
Permissions in this forum:
You cannot reply to topics in this forum
|
|