Results 1 to 5 of 5
  1. #1

    Suggestion for Wait Property

    When I run my script,sometimes,it is taking less/more time to save(I used wait 100)and not able to recognize next step/object.It's showing error message as follows after running on 4 rows.

    Cannot identify the object "changeMsgStatus".

    Any suggestion on how to insert a good wait property here???????

    Here is my script...
    ================================================== ======
    Browser("ABC").Page("Page").WebButton("Sign In").Click


    For i = 1 to 50

    Browser("ABC").Page("Page_3").WebCheckBox("changeM sgStatus").Set "ON"

    Browser("ABC").Page("Page_12").WebButton("Save").C lick
    wait 100

    ================================================== =


  2. #2
    Join Date
    Jan 2007
    Pittsburgh, PA

    Re: Suggestion for Wait Property

    Looks like you are not using synchronization statements after click link/button etc. in your script, give a try with them and see if the error occurs.

  3. #3

    Re: Suggestion for Wait Property

    After you click the save button have a do loop

    Browser("ABC").Page("Page_12").WebButton("Save").C lick

    intMaxWait = 120 ' the maximum wait time for the data to be saved you can changed this value according to your requirment

    Do While True
    'Verify that the changeMsgStatus object exists
    If Window("Window").object("changeMsgStatus").Exist(1 ) = True Then
    Exit Do
    intwait = intwait +1
    End IF

    If intwait > intMaxWait Then
    Reporter.ReportEvent micFail,"Step Failed", "Data NotSaved. Exiting the test"
    End If

  4. #4
    Senior Member
    Join Date
    Feb 2008
    Los Angeles, CA, USA

    Re: Suggestion for Wait Property

    Options 1

    you can wait for any object using

    Object.WaitProperty "visible", true, 10000

    Object = window, browser, webEdit, page, WebButton, WinButton, etc.
    10000 is for 10 seconds (just for this example, i m taking 10 seconds - You can change that according to your necessity). What this statement will do is wait for maximum 10 seconds for 'Object' to be visible. If Object is visible within 2 seconds, it will move to next statement after 2 seconds. But whether the object is visible or not after 10 seconds, it will move to the next step

    Options 2 - As suggested you can use a while-wend or do-while loop and check if the object exists or object's ROProperty visible = true

    Option 3 -
    Waiting for a browser to load, I sometimes check the message on the left bottom - status bar. I wait till either msg - "Done" or msg = ""

  5. #5

    Re: Suggestion for Wait Property

    Yes,'m using synchronization statements(Sync).

    I tried with synchronization point and it's working fine.
    Object.WaitProperty "visible", true, 10000

    Thnx a lot to ALL!!!



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 03:42 PM.

Copyright BetaSoft Inc.