QTP appears to hang as it takes forever for the IE page to load.
Question ID: 104872
1
0

QTP appears to hang as it takes forever for the IE page to load. Has anybody seen this issue?

Marked as spam
Posted by (Questions: 28, Answers: 0)
Asked on February 28, 2013 9:15 pm
87 views
Answers (4)
2
Private answer

Have you tried the following code to have QTP wait for button to enabled.

Flag=False
Do Until Flag=True
Flag=Browser(''Browser'').Page(''Test Page'').WebButton (''Button Demo'').GetROProperty(''enabled'')
Wait 1
Loop

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on February 28, 2013 11:50 pm
1
Private answer

TNone,

I have seen where pages take too long to load due to internal QC servers running under powered. Have you tried to put in waits to have QTP wait for application?

Here is an example of code.


Flag=False
Do Until Flag=True
                Flag=Browser(''Browser'').Page(''Test Page'').WebButton (''Button Demo'').GetROProperty(''enabled'')
                Wait 1
Loop

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on February 28, 2013 9:56 pm
0
I would also suggest adding some kind of counter inside that do until loop, otherwise you might get stuck in there forever. Something similar to : dim i i = 0 Flag=False Do Until Flag=True Flag=Browser(''Browser'').Page(''Test Page'').WebButton (''Button Demo'').GetROProperty(''enabled'') Wait 3 If i>10 Then Exit Do i = i+1 Loop
( at February 28, 2013 11:14 pm)
0
Private answer

How are you launching the IE page (programaticcaly or using built in launch IE on script execution)? Which addons do you have loaded? Try disabling all addons, closing all IE windows, and then launching QTP as an administrator (right click it -> run as administrator). Then try a simple record and playback on IE (www.google.com).

Other questions: Are you on the latest version/patch of QTP/UFT? Do you eventually get any kind of error message?

P.S. here is a simple script that will launch IE (first change the option in record & run setting to ''record and run test on any open browser'':

'Create and launch the Internet Explorer object

Set IE = CreateObject(''InternetExplorer.Application'')

'Set Internet Explorer object to be visible

IE.Visible = True

'Get URL of website to go to

URL = ''www.google.com''

'Navigate to the URL

IE.Navigate (URL)

Marked as spam
Posted by (Questions: 3, Answers: 12)
Answered on February 28, 2013 9:33 pm
0
Private answer

Disable activex addin and give a run.

Marked as spam
Posted by (Questions: 0, Answers: 7)
Answered on February 28, 2013 11:59 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top