Micro Focus QTP (UFT) Forums
How to make scripts sync with application - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to make scripts sync with application (/Thread-How-to-make-scripts-sync-with-application)

Pages: 1 2


How to make scripts sync with application - Rajashekar Gouda - 03-11-2008

Hi All,
I am using Descriptive Programming for my project and application has 10 pages.
On some page we have to select options from drop down. At that time it takes lot of time refresh the page. But because of this slow loading of page scripts are getting failed. To overcome from this issue i have used "wait" statement, but the proble is some time the application will get loaded quickly. At that time "wait" statement make scripts to wait for long time even the page loaded. I have used "Sync" but no use in DP.
Some time i did use
Code:
Do Until i=10
  i=i-1
  If i<10 Then Exit Do
Loop

Apart from this, is there any more solutions for my issue?

Regards
Raj


RE: How to make scripts sync with application - Rajashekar Gouda - 03-12-2008

Any updates on this

Regards
Raj


RE: How to make scripts sync with application - sreekanth - 03-12-2008

hey ,
you can use
object.WaitProperty method .


RE: How to make scripts sync with application - Rajashekar Gouda - 03-12-2008

sreekanth,

Can u pls explain litle more info?

Regards
Raj


RE: How to make scripts sync with application - Rajashekar Gouda - 03-13-2008

Ankur,
any words from your side.
Regards
Raj


RE: How to make scripts sync with application - Ankur - 03-14-2008

Is it really necessary to go for Descriptive Programming? What are the problems you are facing with normal record and playback?

Secondly @Rajashekar, Please try to follow up on any thread you open till the time its fit to close.
At least reply with saying whether the solution posted worked or not, that might be helpful for other members as well.


RE: How to make scripts sync with application - Rajashekar Gouda - 03-14-2008

Ankur,

Yes i have to follow the Descriptive Programming, bcz i have designed the framework with DP only and normal record and playback not usefull in my project and i have tried that also.

Secondly sorry for not replying. Actually i got an answer from on in my previous question but not tried bcz of busy work. I will try the passing result to xls as you said and if it work then i will surely reply.

Regards
Raj


RE: How to make scripts sync with application - Ankur - 03-14-2008

ok...your code above looks fine just add one more line to it.
(here I assume you have initialized i to a value greater than 10)


Code:
Do Until i=10
[b]wait (1)[/b]

..........Your statements here
..........Your statements here
..........Your statements here

i=i-1
If i<10 Then Exit Do
Loop

by the way why do you think normal record and playback would not be useful in your project?


RE: How to make scripts sync with application - Rajashekar Gouda - 03-14-2008

Thanks for ur reply.

First one is I have not initiatted i nay where in my scripts.Is it really required initiatting i in VB?


Secondly.

I have developed Data Driven type framework and my application is too big,it has around 20 pages to navigate and it need lot of info to be passed. And appl is too valatile. On every buid there will some changes of object some where in 20 pages. So if follow Record and Play back the it will be difficult task and i also wriiten lot of reusable functions. i have to follow DP only.


RE: How to make scripts sync with application - sreekanth - 03-14-2008

Hey Rajesh ,
here is my understanding from your previous post:
we have to select a value from dropdown(let it be country:=india) ,now your screen will refresh and you will have to wait until the page refreshes or other page loads (this will allow you to select a state:=punjab).


if it is your problem
the sol :
Code:
If Browser("index").Page("index").WebEdit("Account").WaitProperty("disabled", 0)
Then This code will wait here until the webedit is enabled
Code:
Browser("index").Page("index").WebEdit("Account").Set ("123")


End If