Timeout when the application in Busy
Hi,
I have a timeout error because after a click the Application Under Test exceeds the standar timeout. The application is busy with a database process.
I have two questions about this:
- How can i change the Standar TimeOut? i try doing it using Appium api and don't work.
- I try to create a custom function to check if the process ends, but when the application is busy the WinAppDriver return a error: The application is closed or dont exists. There are a way to check the status of the application (ready/busy).
Thanks,
The exact error when i try to interact with the application and its busy: "no such window","message":"Currently selected window has been closed"
Thanks,
Hi @macervera,
To change the command timeout (the default duration for each command before the test fails automatically), you can call a different constructor when you create the session. Below is an example in C# using AppiumDotNetDriver binding:
WindowsDriver<WindowsElement> session = new WindowsDriver<WindowsElement>(new Uri("http://127.0.0.1:4723"), appCapabilities, TimeSpan.FromMinutes(10));
Note how the last parameter/argument specify a 10 minutes long command timeout. Other binding implementation (e.g. Java, JS, Python) may be different but should be similar.
In regards to checking application status, WinAppDriver should never return no such window error unless the application is really dead/gone. If you observe that WinAppDriver incorrectly return no such window when the application is busy, and later return the proper value when it finished, then please file a different issue with the repro steps.
In general, the application UI thread shouldn't freeze even if it is busy doing something in the background. Instead the UI should probably show something to the user such as loading dialog or a progress bar.
Is it possible to use WindowsDriver<WindowsElement> session = new WindowsDriver<WindowsElement>(new Uri("http://127.0.0.1:4723"), appCapabilities, TimeSpan.FromMinutes(10)); in java?