Welcome, Guest. Please login or register.
Login with username, password and session length

 
Advanced search

18539 Posts in 4847 Topics- by 32743 Members - Latest Member: watty
 

AdvancedQTP forums have been nominated as a finalist in ATI’s 2nd annual automation honors awards!

We’d like to thank you for your continued support and participation, and urge you to hurry and vote.

Make you voice count! 


Pages: [1]   Go Down
Print
0 Members and 1 Guest are viewing this topic.
Author Topic: "Execute"-command very slow    (Read 471 times)
Paul Verlinden
User
*
Offline Offline

Posts: 8


WWW
« on: March 13, 2009, 07:02:35 AM »

I use following code for building a string to fill a test-field in my web-application : 
cCmdString = "Browser("+chr(34)+"BrwName"+chr(34)+").Page("+chr(34)+cPage+chr(34)+")."+cObjType+"("+chr(34)+cObj+chr(34)+").Set"+chr(34)+cValue+chr(34) 

This results in following string to execute :
"Browser("BrName").Page("Page1").WebEdit("Input01").Set "Test"

If I execute this string using the [command] tab during debugging, it takes less then a second to fill the control. 
But if I execute this using the command "Execute cCmdString" it takes 40 seconds(!) until the control is filled. 

Should I use a different command ?   

Rgds,
Paul
Logged
Raja P.V.
FRProject
User
*
Offline Offline

Posts: 44


« Reply #1 on: March 16, 2009, 06:24:43 AM »

Hi Paul,

There may be a performance issue with the application, as you know QTP interfaces with the API's.

Have you tried device replay back on the screen just a like a normal user and than comparing and seeing the times?

Regards
R
Logged
yassa
Administrator
Advanced User
*****
Offline Offline

Posts: 879



WWW
« Reply #2 on: March 20, 2009, 03:32:29 AM »

Perhaps breaking it into separate commands for each object would help:
Execute "Set oBrowser = Browser(""BarName"")"
Execute "Set oPage = oBrowser.Page(""Page1"")"
Execute "Set oEdit = oPage.WebEdit(""Input01"")"
Execute "oEdit.Set ""Test"" "
Logged

Yaron Assa

AdvancedQTP Site Administrator
Pages: [1]   Go Up
Print
Jump to: