Forum Discussion
Thanks for the updates ,
We are getting error in chrome Tests
This operation returned because timeout period has expired
Any updates why we are getting ? Also attaching the screenshot.
Hi,
Any more details?
What operation failed? Anything in the Details log pane? Can you post screenshot of the test? Why 'error' message was manually logged just before?
- Marsha_R4 years agoChampion Level 3
The error messages are usually pretty targeted. What ever that line is looking for didn't happen fast enough for the test to see it.
You can test this by putting a Delay right before the line that failed. If that seems to fix it, then take the Delay out and adjust the failed line with the appropriate Wait
- AlexKaras4 years agoChampion Level 3
Hi,
> It appear randomly.
I have a guess that the error appears when the test is started when the tested site is opened in the browser. Can you confirm this? (Or, maybe, the opposite - the error appears when the test is started when the tested site is not opened in the browser.)
Scenario that I am guessing:
> var titlepage = Aliases.browser...
> ...
> BrowserConfig.killBrowserProcess(...)
> ...
> titlePage.WaitProperty(...);
As it is documented, Aliases uses late binding, resolves referenced object at first use and tries to cache it.
I think that titlePage variable keeps the reference been set initially and this reference becomes invalid when the browser is closed and reopened. Obviously, when test code tries to wait for the Visible property to become true for the empty object, this never happens.
My suggestion will be to:
a) Comment out the .RefreshMappingInfo() line;
b) move the var titlepage = Aliases... line of code to follow the LoginCredentials.basicAuthenticationKeyword(...) line.
Does this help?
P.S. BTW, JScript is a case-sensitive language, but you have titlepage and titlePage variables in your test code. Is this really so?
- Marsha_R4 years agoChampion Level 3
One thing from our side, if you don't give us all the details up front, then we have to keep guessing and you keep telling us no that can't be it. It works better for everyone if you give us lots of details first and then we can give a better answer. Thanks!
- Marsha_R4 years agoChampion Level 3
If what AlexKaras and I have suggested is not working for you, then contact Support directly with your question. Here's their link:
https://support.smartbear.com/testcomplete/message/
- nisgupta4 years agoValued Contributor
Attached the Detail Panel
javaScript runtime error.
The Operation returned because the timeout period expired.
- Marsha_R4 years agoChampion Level 3
So the error comes where you are waiting on Visible?
I would still put a really long Delay in front of that, just for testing purposes. I'd go up to a full minute. It's difficult to see what's happening some times unless you really slow things down.
- nisgupta4 years agoValued Contributor
Intially I put only aqUtils.Delay(3000)
Now I have changed to
if(titlePage.WaitProperty("Visible", true, -1)){
Log.Message("Title exists "+aqObject.CheckProperty(titlePage,"contentText",cmpEqual,expectedTitle));
}else{
Log.Error("Title is not visible");
}Autowait timeout is set to 5 minutes i.e. 300000 ms
- AlexKaras4 years agoChampion Level 3
Hi,
> Now I have changed to
And? Does your code work? What is the error if it does not? What line throws the error?
P.S. Side note:
> if(titlePage.WaitProperty("Visible", true, -1)){
Are you sure that titlePage object exists at that moment of time? Wasn't it recreated by chance?
Note, that if the object does not exist, .WaitProperty() will not work and Visible property will never appear regardless of wait timeout.
Related Content
Recent Discussions
- 22 hours agojstaehlin