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
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi All,

I have prepared following script which needs to be executed on 5-10 live clients every day after deployment of new changes/enhancements.

Load time of each page is different for each live clients. After deployment, our server gets bit solve and loading speed may differ each time.

In below script, I have used "wait" command to get page loaded..

Now the problem is.. Page size of pages different for each client.. Due to which, for some client's site, one page gets loaded fast and for some, its too slow.. If site is slow for any client, then errors of object occurs.

Due to which I need to increase seconds in "Wait" command during run. Because of which if any of site is fast then also it will perform wait operation which results in wastage of time.

Can any one provide me the solution.. Here do I need to use looping for "wait" command.. If yes, please provide me the code for same..

Please help me urgently..

Below is the script..

-----------------
Code:
URL = Datatable.Value("URL",Global)
User_name = Datatable.Value("User_name",Global)
Password = Datatable.Value("Password",Global)
Users = Datatable.Value("Users",Global)

systemutil.Run "iexplore",URL
Wait (5)


Browser("InSync :: Login").Page("InSync :: Login").WebEdit("txtUsername").Set User_name
Browser("InSync :: Login").Page("InSync :: Login").WebEdit("txtPassword").Set Password
Browser("InSync :: Login").Page("InSync :: Login").WebButton("Login").Click
Wait (5)
Browser("InSync :: Login").Page("InSync :: Login_2").WebList("ddlUsers").Select Users
Wait (8)

'Select Facility
If  Browser("InSync :: Login").Page("InSync :: Login_2").WebButton("Ok").Exist Then
    Browser("InSync :: Login").Page("InSync :: Login_2").WebButton("Ok").Click
    Wait (4)
End If
Wait (20)

'Access Scheduler
Browser("InSync :: Login").Page("InSync :: Dash Board").Image("ctl00$Header1$Image2").Click
Browser("InSync :: Login").Page("InSync :: Visit Scheduler").Sync
Wait (50)

'Access Patient Search
Browser("InSync :: Login").Page("InSync :: Dash Board").Image("ctl00$Header1$Image3").Click
Browser("InSync :: Login").Page("InSync :: Patient Search").Sync
Wait(25)

Browser("InSync :: Login").Close

------------------

Thanks,
Mansi.
Reply


Messages In This Thread
How to run same script for different URLs when loading time is different - by mansis - 09-18-2012, 06:06 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 635 11-05-2023, 03:55 PM
Last Post: lravi4u
  How do you Change Run mode mid script? Caleytown 6 7,360 03-25-2021, 08:27 AM
Last Post: RB26578
  QTP not recogonising object during run time Lavanya N 2 3,747 10-28-2015, 12:46 PM
Last Post: vinod123
  Writing to Run time data table Neetha 5 12,211 08-27-2015, 10:18 AM
Last Post: supputuri
  How to run driver script to kick off scripts stored in QC? shipu 0 3,615 04-30-2014, 02:39 AM
Last Post: shipu

Forum Jump:


Users browsing this thread: 1 Guest(s)