Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP 9.5 problem with browser
#11
Not Solved
Hi Ankur,
I played around with the script now. But it is still very strange. After calling the Browser("..").Close-Method, QTP is waiting for a while until the browser is closed (which could mean up to 5 minutes waiting time). If I stop the running of the test during this waiting (right after calling the .close-method!) the test stops (of course Wink ) and the Internet Explorer is closed immediately! So it seems that QTP has some problem here. IE seems to work fine...
Now the piece of code:
Code:
Browser("Browser").Page("Page").Frame("CONTENT").WebEdit("ValueTextField21").Submit
Browser("Browser").Page("Page").Frame("CONTENT").Image("open as Excel file").Click
                    
Dim temp_Report
temp_Report = "C:\Temp\temp_report.xls"
While Browser("Browser").Dialog("File Download").Exist(2)
    Browser("Browser").Dialog("File Download").Activate
    Browser("Browser").Dialog("File Download").WinButton("Save").Click
Wend
                    
Dialog("File Download_2").Dialog("Save As").WinEdit("File name:").Set temp_Report
Dialog("File Download_2").Dialog("Save As").WinButton("Save").Click
If Dialog("File Download_2").Dialog("Save As").Dialog("Save As").Exist(1) Then
    Dialog("File Download_2").Dialog("Save As").Dialog("Save As").Activate
    Dialog("File Download_2").Dialog("Save As").Dialog("Save As").WinButton("Yes").Click
End If
Dialog("File Download").Close

If Browser("Browser").Exist(2) Then
    Browser("Browser").CloseAllTabs
End If

This is just the end of the script, but it is definitely the critical part. If I remove the lines from clicking on "save as excel" (which starts the download of an excel file) until the line with Browser.Exist, everything works fine.
So the opening of the file-save-dialog somehow distracts QTP...

Do you have any idea how this could be solved?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Cannot find the "[ WebEdit ]" object's parent "[ Browser ]" (class Browser). Verify t Divya Roopa 1 8,280 03-11-2014, 12:13 PM
Last Post: devarapallliramana

Forum Jump:


Users browsing this thread: 1 Guest(s)