Forum Discussion

foxruru's avatar
foxruru
Occasional Contributor
13 years ago

Why Tc can't identification the same object at running the second time?

script Scene: 1. At a search page, input text:  XX1, click button for search

                   2.  delay(6000), to continue to work on this and to input text: XX2, click search button


Problem: At the first step,TC can identification  textbox object,but can't identification textbox object  at step 2.


I tried  write the code : editbox. WaitProperty (Enabled, True, 6,000);  I try to operate the text box objects,but still can't identification text box objects.

3 Replies

  • Hi,



    First of all, what TC version (Help | About...) do you have?



    What errors do you see in the log and what are their 'Additional information' section contents? Also, what exact script lines generate these errors?
  • foxruru's avatar
    foxruru
    Occasional Contributor
    I guess I don't have to speak clearly.

    the code has a cycle

    Page(xxxx)=........



    for(i=0;i<10;i++)

    {

         Page(xxxx)........

    }

    I found if the i=1 then it run sussess,but i=2 then object can't be identification.I try to edit the code

    for(i=0;i<10;i++)

    {

        delay(50000) ;

    Page(xxxx).waitProperty(.....)

    Page(xxxx)........

    }





    but i=2 then object can't be identification again.


  • Hi,



    What do you see in the log (both the error messages and their 'Additional information' section values)? What exact code is in the problematic loop and what lines generate errors? The script you've posted is pseudo-code which doesn't provide much information.



    Also, do you see the objects you're trying to access in the Object Browser if you switch to it while your test is paused on a breakpoint?