Hi,
In your case, kindly use the getLastWindowTitle() function and if you are not sure about the time then you can use the waitForPageDownload() function before using the getLastWindowTitle() as follows:
waitForPageDownload()
result = getLastWindowTitle()
displayMessage(result)
Kindly get back to us for any clarifications.
Thanks,
QEngine Team.
Thanks for the quick reply.
Continue to the problem i had mentioned previously
As per you suggestion I have updated the script as shown below,
useSuiteLevelMapFile()
page = "http://allrecipes.co.uk/sitemap.aspx"
launchApplication(page)
wait(5)
waitForPageDownload()
result = getLastWindowTitle()
displayMessage(result)
The test report displayed "WINDOW NOT AVAILABLE" and the error message "Wait For Page DownLoad Failed"
Could you please let us know the solution when i am not sure what will be the window title? Also i want to set that window dynamically getting the window title.Note : This time getWindowTitle() worked fine. but test report displayed error message.
Thanks,
Santosh
Hi,
Kindly try this workaround:
Use the script in the following way.
launchApplication("about:blank")
changeURL("http://allrecipes.co.uk/sitemap.aspx",5)
setDynamicWindow("NONE",1,"NONE","NONE",1)
waitForPageDownload()
result = getLastWindowTitle()
displayMessage(result)
Let me know if this works for you.
The provided solution still does not work. We have slightly modified the following code, Also attaching the log file.
for i in range(1, 3):
launchApplication("about:blank")
page = "http://allrecipes.co.uk/sitemap.aspx"
changeURL(page,5)
setDynamicWindow("NONE",1,"NONE","NONE",1)
waitForPageDownload()
winTitle = getLastWindowTitle()
displayMessage(winTitle)
setDynamicWindow(winTitle,1,"NONE","NONE",1)
closeAllWindows()
launchApplication("about:blank")
page = "http://www.rediff.com"
changeURL(page,5)
setDynamicWindow("NONE",1,"NONE","NONE",1)
waitForPageDownload()
winTitle = getLastWindowTitle()
displayMessage(winTitle)
setDynamicWindow(winTitle,1,"NONE","NONE",1)
Displaying the following error continuously.
setDynamicWindow NONE :Line : 7 FAILED FAILED setDynamicWindow FailedwaitForPageDownload Line : 8 FAILED WINDOW NOT AVAILABLE Wait For Page DownLoad Failed
Kindly provide a solution.
Thanks for sending all the required log files to analyze the problem.This problem may happen, when the response timeout value is reduced /changed under settings--->Error Recovery.
Do not change the response timeout value in the Error Recovery settings.That is nowhere related to playback speed.
Thanks,
Naveen
QEngine Team
Corp