WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

Is WinAppDriver suitable for long running tests? Crashed after some time with an exception code 0x4000001f

Open spacer-rado opened this issue 4 years ago • 3 comments

Hi folks,

can I get an answer on a question whether WinAppDriver is also suitable for long running tests? We have a long running test suite which we want to be running for at least 7 days.

Now, when we executed the test, it crashes after already couple of hours (sometimes less, sometimes more) because there is no connection to the remote (or local) winappdriver instance. When we checked the machine, WinAppDriver was not running anymore.

Our long runner is basically an infinit loop where we start the application on a local and a remote machine (both machines have their winapp driver running). E.g. first 80 test runs (loops) are completely ok, and then suddently, during the next test run, winappdriver is stopped and therefore the test cannot connect and the test fails. It starts the application, clicks some elements and then, crash.

Event viewer contains error image

I checked different sites and also some threads here, but no success. Thanks for any hints/advice.

WinAppDriver version can be seen in the picture and the test is written in C# and the tested application is in C# WPF. Tests are running on Windows 10 and all is x64.

spacer-rado avatar Feb 11 '21 11:02 spacer-rado

I start and stop Winappdriver.exe after every test.

anunay1 avatar Feb 11 '21 15:02 anunay1

I start and stop Winappdriver.exe after every test.

@anunay1 Can you please provide me the code. Below snippet is not working ending up with error

public static void start_Driver() throws Exception {

	String filelocation = System.getProperty("user.dir") + File.separator + "WinAppDriver" + File.separator
			+ "WinAppDriver.exe";
	System.out.println("file ---->  " + filelocation);
	ProcessBuilder pBuilder = new ProcessBuilder(filelocation).inheritIO(); 
	// pBuilder.inheritIO(); p =
	pBuilder.start();

} 

krishna494 avatar Aug 11 '21 20:08 krishna494

brother, I have the same problem. The WinAppdriver runs 310 minutes and then stops. Below is the details: Faulting application name: WinAppDriver.exe, version: 1.2.2009.2003, time stamp: 0x5f50394d Faulting module name: WinAppDriver.exe, version: 1.2.2009.2003, time stamp: 0x5f50394d Exception code: 0x4000001f Fault offset: 0x00003e00 Faulting process id: 0x3b58 Faulting application start time: 0x01db7e7889e09aad Faulting application path: C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe Faulting module path: C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe Report Id: aba36a0e-9add-4592-9039-641cc682b123 Faulting package full name: Faulting package-relative application ID:

and the message from visual studio: Test method BeanTest.Jupiter3120.Jupiter3120UITest.Continous_Run threw exception: OpenQA.Selenium.WebDriverException: A exception with a null response was thrown sending an HTTP request to the remote WebDriver server for URL http://127.0.0.1:4723/session/3EF301F7-B8EC-4F60-B181-FC35A2A9C68D/element/7.4952.6758619/text. The status of the exception was ConnectFailure, and the message was: Unable to connect to the remote server ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:4723

ZebinGao avatar Feb 14 '25 07:02 ZebinGao