Program closes unexpected on UI access
See original GitHub issueThe problem Running a test with WinAppDriver and Appium.Webdriver sometimes ends in an unexpected exit of the tested program - it just closes. No errors, no message. Just like clicking the “Close” button. The behavior is not really reproducable, not every test fails in this behavior. A test can run 10 times, and then it suddenly stops again. Appium.Webdriver runs on a test agent and accesses a remote machine running WinAppdriver.
Environment Appium.Webdriver 4.1.1
Desktop OS/version used to run Appium: Windows 10 Real device or emulator/simulator: -Real Device over CLI
Details Since there’s no really exception or error in the log, I can’t give you anything. If WinAppDriver tries to click again on a window Element, it fails with the specific exceptions, because it cannot find any window element. I am testing native windows programs. As I’m new in this area, I’d please you to tell me exactly how I can help you finding my problem. Hopefully we can manage that. By the way, the closing happens with every selected program, so it’s not program specific. Thank you in advance for your help.
Log of test itself, after the error:
2020-07-06T09:47:50.8429838Z ##[error]Error Message:
2020-07-06T09:47:50.8430560Z ##[error] Test method UpdateService.SystemTest.KusReleaseTests.InstallAndDeinstallMsiOnController threw exception:
2020-07-06T09:47:50.8431011Z ##[error]OpenQA.Selenium.WebDriverException: An element command failed because the referenced element is no longer attached to the DOM.
2020-07-06T09:47:50.8431321Z ##[error]Stack Trace:
2020-07-06T09:47:50.8431633Z ##[error] bei OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
2020-07-06T09:47:50.8431957Z ##[error] bei OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary2 parameters) 2020-07-06T09:47:50.8432601Z ##[error] bei OpenQA.Selenium.Appium.AppiumDriver1.Execute(String driverCommandToExecute, Dictionary2 parameters) 2020-07-06T09:47:50.8432923Z ##[error] bei OpenQA.Selenium.Remote.RemoteWebElement.Execute(String commandToExecute, Dictionary2 parameters)
2020-07-06T09:47:50.8433237Z ##[error] bei OpenQA.Selenium.Remote.RemoteWebElement.get_Text()
2020-07-06T09:47:50.8433561Z ##[error] bei OpenQA.Selenium.Appium.AppiumWebElement.<get_Text>b__8_0()
2020-07-06T09:47:50.8433891Z ##[error] bei OpenQA.Selenium.Appium.AppiumWebElement.CacheValue(String key, Func`1 getter)
2020-07-06T09:47:50.8434196Z ##[error] bei OpenQA.Selenium.Appium.AppiumWebElement.get_Text()
Issue Analytics
- State:
- Created 3 years ago
- Comments:17
Top GitHub Comments
Can’t tell you right now, just changed the tests to your suggestion, they’re running overnight. Will tell you as soon as I know more.
Our tests are green! It’s really dependent on that timout @anunay1 marked as solution. So now I’m not sure if there’s a misfunction because each of our test opens and closes a new solution and none of them take over 30 minutes but I will check that by time again. Eventually we can close this issue, reopening one if I find something new. Thank you very much for your help.