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)
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?
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?
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.
I namemapped the object in TC, and try again, but still doesn't help. Below is the code.
Nevermind, I just noticed testobject.Wait is for page only. I used sys.Browser("*").Page("my url").Wait(2000), and it works. Thank you!