Why TC keeps waiting until the time expire while I can see the object I am waiting for is there
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why TC keeps waiting until the time expire while I can see the object I am waiting for is there
Hi Guys,
I was trying to get TC to click on a link and then click on another link on the page after. So I used a WaitChild method in the script, but it keeps waiting on the page until the 30 seconds expired, but I can see the object that I was waiting for was showing on the page as soon as the first link was clicked. Same issue when I used the WaitProperty method instead of the WaitChild. Can anyone tell me what wait method I should use in order to avoid uneccessary waiting?
sys.Browser("*").Page("*").Find("contentText","Photo, Video & Design",30).Click
call Sys.Browser("*").Page("*").WaitChild(Sys.Browser("*").Page("*").Find("contentText","Corel",30),30000)
sys.Browser("*").Page("*").Find("contentText","Corel",30).Click
Thanks!
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
[Hall of Fame]
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
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
[Hall of Fame]
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
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I namemapped the object in TC, and try again, but still doesn't help. Below is the code.
Aliases.browser.pagePaypalexpressPayment.PayPalConfirmationMessage.Wait(20000)
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nevermind, I just noticed testobject.Wait is for page only. I used sys.Browser("*").Page("my url").Wait(2000), and it works. Thank you!

- « Previous
-
- 1
- 2
- Next »
- « Previous
-
- 1
- 2
- Next »