Forum Discussion
lkonduru
14 years agoOccasional Contributor
Jared,
I tried creating a new "page" object for popup window, but while try to click on the link on the pop up page. I keep getting the object variable undefined. And also, the parent or main page window url is getting changed to popup url. Please find below the code snippet. I would appreciate your suggestion.
function MainPageTest() {
......
for (var i = 0; i < xxx.length; i++) {
xxx.click(); // from main page click, this opens up popup window
page.Wait();
var popUpUrl = "http://popurl";
var popUpPage = getPage(popUpUrl); // getting "page" for popup url
var tab = popUpPage.NativeWebObject.Find("href", "*" + "abc" + "*", "a"); // try to select a tab from pop up
// Note: tab value is coming as undefined
tab.click();
}
}
Thanks
I tried creating a new "page" object for popup window, but while try to click on the link on the pop up page. I keep getting the object variable undefined. And also, the parent or main page window url is getting changed to popup url. Please find below the code snippet. I would appreciate your suggestion.
function MainPageTest() {
......
for (var i = 0; i < xxx.length; i++) {
xxx.click(); // from main page click, this opens up popup window
page.Wait();
var popUpUrl = "http://popurl";
var popUpPage = getPage(popUpUrl); // getting "page" for popup url
var tab = popUpPage.NativeWebObject.Find("href", "*" + "abc" + "*", "a"); // try to select a tab from pop up
// Note: tab value is coming as undefined
tab.click();
}
}
Thanks
Related Content
- 6 years agomgreen
- 2 years agoaadzhigitov
- 8 years agowilkinc