Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
.Sync is NOT waiting for browser to complete current navigation.. can anyone help?
#1
Not Solved
For below script, I was using wait (3) to view the operations mentioned in script.. But due to wait command, I need to face 3 secs unnecessary delay..

I though .Sync can solve my purpose of waiting to complete current navigation and then only moving ahead.. But when I use .Sync in below script, It is not waiting to load the mentioned page and it goes ahead, which is wrong. Please review below script.

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

Code:
DataTable.Import("D:\Book1.xls")

For i=1 to Datatable.GetRowCount
DataTable.SetCurrentRow i
SystemUtil.Run DataTable("URL",dtGlobalSheet)
Browser("InSync :: Login").Page("InSync :: Login").WebEdit("txtUsername").Set DataTable("Username",dtGlobalSheet)
Browser("InSync :: Login").Page("InSync :: Login").WebEdit("txtPassword").Set DataTable("Password",dtGlobalSheet)
Browser("InSync :: Login").Page("InSync :: Login").WebButton("Login").Click
Browser("InSync :: Login").Page("InSync :: Login_2").WebList("ddlUsers").Select DataTable("User",dtGlobalSheet)

'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 (2)
Else
    Reporter.ReportEvent micPass, "Login page", "Facility not exist"
    Wait (2)
End If

'Access Scheduler
Browser("InSync :: Login").Page("InSync :: Dash Board").Image("ctl00$Header1$Image2").Click
[color=#FF0000]Browser("InSync :: Login").Page("InSync :: Visit Scheduler").Sync[/color]

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

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

Here with above script, though step of scheduler accessing is NOT yet started / completed, next step of accessing patient search is started.. I was expecting that .Sync will help me to load scheduler page first.


Can anyone please let me know that what is wrong here.

If .Sync can solve my problem then I want to replace it with Wait to avoid unnecessary delay.
Reply
#2
Not Solved
Please help me urgently...
Reply
#3
Not Solved
Hi,
if wait will not solve...use

Code:
do
wait(3)
loop while Browser("InSync :: Login").Page("InSync :: Dash Board").Image("ctl00$Header1$Image3").exists(3)
Reply
#4
Not Solved
You could also do a loop such as...

Code:
Do while Browser(YourBrowser).Object.Busy = True
    Wait 0, 250
Loop
Reply
#5
Not Solved
Hi,

Error occurs while I am using your code of loop..Please referr attachment.

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 URL,1
'Wait (15)
Do while Browser("InSync :: Login").Object.Busy = True
    Wait (5)
Loop


Browser("InSync :: Login").Page("InSync :: Login").WebEdit("txtPassword").Set Password
Browser("InSync :: Login").Page("InSync :: Login").WebButton("Login").Click

Do while Browser("InSync :: Login").Object.Busy = True
    Wait (5)
Loop

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)


Browser("InSync :: Login").Close
------------------

Please help me to resolve this error.

Thanks,
Mansi.


Attached Files Image(s)
   
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Cross Browser Sync Not Working geodude 0 1,968 04-07-2017, 08:43 AM
Last Post: geodude
  Auto Complete list not displayed in PEGA7 adityacharan 0 2,416 11-29-2015, 12:07 PM
Last Post: adityacharan
  How to use sync function 22sumit 2 3,480 06-16-2015, 06:27 PM
Last Post: 22sumit
  Select Current Date from a Calendar Control qtpbeginner78 11 25,434 06-04-2013, 05:38 AM
Last Post: qtpbeginner78
  error object disabled on line 9 where it says " Browser("Browser").CloseAllTabs" kp_usa 1 3,352 12-20-2012, 12:20 AM
Last Post: adityapant27

Forum Jump:


Users browsing this thread: 1 Guest(s)