cancel
Showing results for 
Search instead for 
Did you mean: 

Why TC keeps waiting until the time expire while I can see the object I am waiting for is there

SOLVED
Frequent Contributor

Re: Why TC keeps waiting until the time expire while I can see the object I am waiting for is there

Hi @tristaanogre , I got the contentText by inspecting the object, so that included everything. please see my screenshot below.

Call Sys.Browser("*").Page("*").WaitProperty("contentText","PayPalExpress payment",30000)

Capture.JPGCapture2.JPG

Community Hero

Re: Why TC keeps waiting until the time expire while I can see the object I am waiting for is there

Well, first of all... did you just type it or did you copy and paste?  Because if you just typed it, that doesn't mean you got all the non-printing Characters.

Secondly... you REALLY should be more specific with your page.  "Page('*') is going to search ALL pages that are currently open.

And finally... why aren't you NameMapping?


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Highlighted
Frequent Contributor

Re: Why TC keeps waiting until the time expire while I can see the object I am waiting for is there

I copied the contentText content from the property table. I was just testing this method, so I only had 1 browser 1 tab opened while the script was running, isn't it the same as I specify the browser and page in the code? How does namemapping help in this case? I just want to wait for that object to be found and then perform another action, I don't need to do anything on this object. Did you mean I should namemapping the text I was looking for?

Community Hero

Re: Why TC keeps waiting until the time expire while I can see the object I am waiting for is there

NameMapping is the preferred method of object identification in TestComplete.  It has built in search and identifciation features to make locating and working with objects more reliable and rebust.

Basically... what this all comes down to is that TestComplete is trying to find the object that you're wanting to work with.  So, it needs to go through processing based upon a global time out.  By wild-carding the page, you're telling TestComplete to do a rather extensive search.  THe more specific you are in identifying objects, the better TestComplete responds.

 

So... right now, it's looking for a global page and then waiting for it to load... I know the page is fully loaded visibly, but there's still search processing that is going.

Also....  while you only have one browser and page open, modern versions of windows and browsers sometimes still have residual processes in memory.  So, it's searching ALL browsers and ALL pages in memory to try and find what you're looking for.

so.... clean up your object identification, look into actually mapping objects and components, and work on more robust code for identifying objects.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Frequent Contributor

Re: Why TC keeps waiting until the time expire while I can see the object I am waiting for is there

I namemapped the object in TC, and try again, but still doesn't help. Below is the code.

Aliases.browser.pagePaypalexpressPayment.PayPalConfirmationMessage.Wait(20000)

Capture.JPGCapture2.JPG

Frequent Contributor

Re: Why TC keeps waiting until the time expire while I can see the object I am waiting for is there

Nevermind, I just noticed testobject.Wait is for page only. I used sys.Browser("*").Page("my url").Wait(2000), and it works. Thank you!

New Here?
Join us and watch the welcome video:
6 / 7 API Testing Mistakes Video
Top Kudoed Authors