von_bailey
13 years agoContributor
Invisible or out of windows bounds
I have a script that works in Chrome but not in IE9. Not sure why. The problem object is visible on the screen and works perfectly when run in Chrome, but running the same script, in IE9 and the object cannot be found. It displays the errors that it is "waiting for the window to activate" and then "Waiting until the overlapped window becomes visible". However, the page appears active and while I'm not sure what "overlapped window" needs to become visible, the one that is needed to perform the actions coded is visible on the screen.
Attached is the code being used and a picture of the errors as they appear in the log. It should be run against the following URL:
https://www.clublocal.com/tx/dallas-fort-worth/reviews
Start with the "dome" function.
function mainReviews(theBrowser,theEnv, all){
// Activating the Reveiws pages
var reviewPage=Sys.Browser(theBrowser).Page(theEnv+"/*").Header(0).Panel(0).Panel(0).Nav(0).Link(2)
reviewPage.click(5,5)
Delay(2500)
Log.Message("Generic Page")
clickThrough(theBrowser,theEnv)
var Reviews=Sys.Browser(theBrowser).Page(theEnv+"/*").Panel("stage").Panel(0).Panel(1)
Delay(2500)
// Flipping through the various services
for(i=0;i<14;i++){ // This value must be changed to match the total services with reviews listed
var Listing = Reviews.Link(i).contentText
Log.Message("Listing "+ Listing)
Reviews.Link(i).click(3,3)
Delay(2500)
// Checking the paging
var ckListing = Sys.Browser(theBrowser).Page(theEnv+"/*").Panel("stage").Panel(0).TextNode(0)
///Check if Listing is in the ckListing value. If not it needs to record the problem and move on to the next link.
listVerified=ckListing.Find("contentText","*"+Listing+"*")
if(listVerified.Exists==false){
Log.Error("Failed to open the "+Listing+" Reviews Page")
continue;}
clickThrough(theBrowser,theEnv)
}
// Closing
if(all==false){closeClass("Consumer Reviews Page Detail Test Complete")}
}
function clickThrough(theBrowser,theEnv){ // This function only occurs if the panel with the "Newer" and "Older" buttons is visible
if(Sys.Browser(theBrowser).Page(theEnv+"*").Panel("stage").Panel(0).Panel(0).Panel(1).Visible==true){
Sys.Browser(theBrowser).Page(theEnv+"*").Panel("stage").Panel(0).Panel(0).Panel(1).Panel(1).Click(5,5)
Delay(2500)
Sys.Browser(theBrowser).Page(theEnv+"*").Panel("stage").Panel(0).Panel(0).Panel(1).Panel(0).Click(5,5)}
}
function dome(){
mainReviews("iexplore","https://staging.clublocal.com",0)}
Attached is the code being used and a picture of the errors as they appear in the log. It should be run against the following URL:
https://www.clublocal.com/tx/dallas-fort-worth/reviews
Start with the "dome" function.
function mainReviews(theBrowser,theEnv, all){
// Activating the Reveiws pages
var reviewPage=Sys.Browser(theBrowser).Page(theEnv+"/*").Header(0).Panel(0).Panel(0).Nav(0).Link(2)
reviewPage.click(5,5)
Delay(2500)
Log.Message("Generic Page")
clickThrough(theBrowser,theEnv)
var Reviews=Sys.Browser(theBrowser).Page(theEnv+"/*").Panel("stage").Panel(0).Panel(1)
Delay(2500)
// Flipping through the various services
for(i=0;i<14;i++){ // This value must be changed to match the total services with reviews listed
var Listing = Reviews.Link(i).contentText
Log.Message("Listing "+ Listing)
Reviews.Link(i).click(3,3)
Delay(2500)
// Checking the paging
var ckListing = Sys.Browser(theBrowser).Page(theEnv+"/*").Panel("stage").Panel(0).TextNode(0)
///Check if Listing is in the ckListing value. If not it needs to record the problem and move on to the next link.
listVerified=ckListing.Find("contentText","*"+Listing+"*")
if(listVerified.Exists==false){
Log.Error("Failed to open the "+Listing+" Reviews Page")
continue;}
clickThrough(theBrowser,theEnv)
}
// Closing
if(all==false){closeClass("Consumer Reviews Page Detail Test Complete")}
}
function clickThrough(theBrowser,theEnv){ // This function only occurs if the panel with the "Newer" and "Older" buttons is visible
if(Sys.Browser(theBrowser).Page(theEnv+"*").Panel("stage").Panel(0).Panel(0).Panel(1).Visible==true){
Sys.Browser(theBrowser).Page(theEnv+"*").Panel("stage").Panel(0).Panel(0).Panel(1).Panel(1).Click(5,5)
Delay(2500)
Sys.Browser(theBrowser).Page(theEnv+"*").Panel("stage").Panel(0).Panel(0).Panel(1).Panel(0).Click(5,5)}
}
function dome(){
mainReviews("iexplore","https://staging.clublocal.com",0)}