Why QEngine method - getWindowTitle() fails?

by 
 on 08-Sep-2009 11:51 PM.
  in  Test Automation 

getWindowTitle() returns "FAILED_BROWSER_CRASHED" despite providing sufficient wait time to load the page.


Also before invoking the get window title method we used waitForPageDownload() method.


What is the workaround for this issue when I am not sure about the window title and at the same time I need to select it and set some data into the input fields of that window?

  • No status

 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 Failed
waitForPageDownload Line : 8 FAILED WINDOW NOT AVAILABLE Wait For Page DownLoad Failed

Kindly provide a solution.
Attachments

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.


That will actually report lot of Failed_Browser_Crashed issue even though browser is properly playing back. It is timeout value using which QEngine determines browser is crashed if there is no response from the browser for the specified period of time.

If you wish to improve playback speed, configure Fast Playback in the Play settings and configure the Fast Mode wait time as low as possible. It also can be 0 ms. By default QEngine has it as 500 ms.

Kindly set the response time out value in Error Recovery to 300000 in the settings.

Now run the regression testing and let us know if this resolves the issue which you are facing currently .

Thanks,
Naveen
QEngine Team

 

Post Actions
Statistics
  • 5
     Replies
  • 309
     Views
  • 0
     Followers
Tags for the post
No tags available for this topic.
© 2009 Corp. All rights reserved. Trademarks | Privacy Policy | Site Map | Contact Us | Careers

Edit Link Delete Link

Edit Link Delete Link

LoadingImage