Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to run same script for different URLs when loading time is different
#6
Solved: 10 Years, 9 Months, 1 Week ago
Hi,

Thanks for your help..It works now..

But I need your favor.. Can you please explain me the following code which you gave me so that I can use it, if It is fully clear for me...

----
Code:
blnImg=Browser("InSync :: Login").Page("InSync :: Login").WebElement("InSync® EMR and Practice").Exist
count=1
While Not blnImg
Wait (1)
blnImg=Browser("InSync :: Login").Page("InSync :: Login").WebElement("InSync® EMR and Practice").Exist

count=count+1
If count=8 then
blnImg=True
End if
Wend

-----

Below is my understanding of code and questions list-

Here, in above code, I think first you have define the variable bInImg in which you have checked that object is Exist or not..
Lets say for first time bInImg = false (because object may not be loaded)
Now you have define one more variable count by taking value 1.
Next is time of loop..
While Not bInImg (i.e. while bInImg = false) then wait (1)
now I don’t understand that why you have again define bInImg by again checking that object is Exist or not?
Let say if now bInImg = True / False it will increase count by 1 and will check if condition that count = 8 or not..
Here my one more question is instead of above code, if I used wait (8) then it will wait for 8 secs and if I use above code then it will run 8 iteration of loop. So what is difference in using 8 secs and 8 iteration loop… Here if after performing 8 iteration also page is yet not loaded then this code will be failed.. right??

Please kindly explain me in detail.. I am beginner in QTP so needs to patience help..

Thanks a lot,
Mansi.
Reply


Messages In This Thread
RE: How to run same script for different URLs when loading time is different - by mansis - 09-21-2012, 12:42 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to send/pass UFT Run Error Dialog as output value to main driver script lravi4u 0 345 11-05-2023, 03:55 PM
Last Post: lravi4u
  How do you Change Run mode mid script? Caleytown 6 6,551 03-25-2021, 08:27 AM
Last Post: RB26578
  QTP not recogonising object during run time Lavanya N 2 3,549 10-28-2015, 12:46 PM
Last Post: vinod123
  Writing to Run time data table Neetha 5 11,675 08-27-2015, 10:18 AM
Last Post: supputuri
  How to run driver script to kick off scripts stored in QC? shipu 0 3,397 04-30-2014, 02:39 AM
Last Post: shipu

Forum Jump:


Users browsing this thread: 1 Guest(s)