Open azharashra05 opened 3 years ago
Try to use the following AppiumOption with a value like 3 or 5. This will introduce a short delay when your application will be started and WAD will try to find the application window a little later and most likely succeed.
ms:waitForAppLaunch
Thanks @naeemakram,I have tried your specified capibilities,still some testcases are failing due to currently selected window has been closed.Some testcases are passing in one run but it's uncertain in next run.It is failing due to this error.
Sample code,
var appiumoptions = new AppiumOptions();
appiumoptions.AddAdditionalCapability("ms:waitForAppLaunch","40");
var session = new WindowsDriver
Your application has a splash screen, you need to create a root session and then switch to the application. Read the FAQ
Your application has a splash screen, you need to create a root session and then switch to the application. Read the FAQ
My application does not have splash screen
Then your application might not be launching on the hosted machine.
@azharashra05 Is this error appeared just after creating a session? If yes try to use try cache and then create a session from root session or by the process.
@Shakevg I have run testcase manually on self hosted agent,I figured out,it failed in odd times and failed after 3-4 mins.I am using method to create session.
@azharashra05 Could you post a code example that failed?
Hii,
I am running UI testing testcases for UWP(C#) application.It is working fine on my local machine,when i tried to run on ms hosted agent,most testcases are failing with error like Currently selected windows has closed.I have verified,i am prroviding same configuration for ms hosted agent like local machine.
I request your kind help in this regard.
Thank you in advance.