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.
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
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.
First of all error do not appear everytime.
It appear randomly. We are running our tests using window scheduler job.
If the object is not visible then it invoke the error log event and we get the notification. this is why one can see in the report .
Since it's a random error, I would put the Delay back in and set that one to 5 minutes. If that works properly for a while, then you'll know it's a timing problem and you can cut the Delay down to 3 minutes and try again.
I would be that there's something in the environment that's getting hung up occasionally and you are seeing the effects of that. Once you get the timing of it down, there may be system logs you can check to see what's going on.
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?
I will your approach.
But one thing here is we already running our same firefox tests , we do not have such issues on those firefox tests .
for titlepage and titlePage - I made a mistake .
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!
what details you need ?
Here are other details. We are using window task scheduler. We create a batch script to invoke the projectsuites/Project and they are running in sequence on TestExecute machine. We first run our firefox Project Suits/Project and then chrome ProjectSuites/Project.
Let me know if you need more information.
Subject | Author | Latest Post |
---|---|---|