Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP 9.5 problem with browser
#1
Not Solved
Hi,

I'm using QTP 9.5 with the web-plugin.
As I am running my script, browsing a web-page and downloading a file, the browser-object of QTP does not respond any more.
After letting QTP close the "Save-As"-Dialog of the Internet Explorer 6, I would like to go on browsing on the web page.
It works, if I click on any link on my own and then let QTP go on with its work.

My code is:
Code:
Dialog("Download complete").Activate
Dialog("Download complete").WinButton("Close").Click

Browser("Browser").Page("Page").Frame("TOC").Link("Advanced Search").Click

But after clicking on Close (2. line), the browser will not do anything (does not execute last line). It even does not report any error! When I click on the link on my own, the script goes on, clicking on the link as described in the last line.

Do you have any idea how to fix this problem?
Thanks in advance!
Reply
#2
Not Solved
This problem does not seem to be very common...
But I have some more trouble dealing with the browser. I managed to create one test with a browser, logging in to an application, putting some data in, and in the end downloading a result-file.
After closing the download-window of IE6, I would like to do the whole thing again, with different data.

The problem is:
After starting the browser the first time, I can navigate to some page, like this:
Code:
Browser("Browser").Navigate "www.google.com"

But after having done something with the browser, I can not do the same again. Calling the function (Browser("Browser").Navigate "www.google.com") like before will not work anymore, because the Browser-object cannot be found anymore...
Do you have any idea, what the problem could be? For now I will have to kill the iexplore.exe-process and start it again, to proceed with the test...
Reply
#3
Not Solved
so u mean to say even after closing your 1st IE window, iexplore.exe process continues to run in the background??
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#4
Not Solved
No, my problem is that after certain actions the Browser-object is not recognized by QTP anymore, although the Internet Explorer is still running.

After opening the browser, I navigate to an intranet-website, put some data into a form to search something. The webpage gives me the opportunity to download the results as an excelfile. After I download this, the browser is still open, no other window is open! But the browser is not recognized anymore...
After I click on any link on the website manually, QTP recognizes the browser again and performs its steps... The problem is, that the automatic testing should perform without my interaction Wink

In order to automatically go on with the test, I kill the iexplore.exe-task. After killing this task, the IE is not running anymore and I can start IE again to go on with the testscript. But I don't like this method very much!
Reply
#5
Not Solved
as you said no other window is open , I will assume you mean here that no other browser is open so the possibility of "creation time" ordinal identifier is ruled out..

we "ll go step by step now...

Let me know if this is working...
Code:
If Browser().Exist
....
else
...
End if
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#6
Not Solved
Hi,

I attached the code you proposed to my testscript, after the download is completed. It looks like this:
Code:
'Download something
If Browser("Browser").Exist(1) Then
    Browser("Browser").Close()
Else
Dim lala
    lala = 12
End If
QTP steps into the IF-case. So it recognizes the browser. It then waits approximately 5 minutes (it does not timeout!) until it closes the browser.

As I saw QTP having closed the browser, I tested my earlier script again. Here it is the same problem... it just waits very long until it goes on. So the browser-object it still there. But somehow, QTP needs a long time to access the browser again.

So thanks for the help until now, but do you have any further idea, what the problem could be?
Reply
#7
Not Solved
ok now use .Activate method for the object where QTP isn't able to recognize.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#8
Not Solved
Hi Ankur,
I cannot find the .Activate method for the browser("xx")-object. Is there another similar method? Or do I have to use it with another object?
Reply
#9
Not Solved
yes with other object...Browser doesn't support .Activate method...paste the problematic piece of code here if you are still not able to get what I mean
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#10
Not Solved
Hi Ankur,

Sorry, that I did not reply until now.
I'm not able to test it at the moment, because I cannot connect to the intranet-page.

I tried to recreate the problem with another website in the internet, but the problem did not occur there. Sad

As soon as I can, I will try again, and post my results. Smile
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,283 03-11-2014, 12:13 PM
Last Post: devarapallliramana

Forum Jump:


Users browsing this thread: 1 Guest(s)