getWindowHandles returns "500 internal server error" with excel
Hi, we are facing a strange issue while automating microsoft excel with winappdriver. While trying to work around the splash screen with excel we are seeing "500 internal server error" while trying to fetch the window handles. I have mentioned the code, webdriver trace and the server logs below:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("app", "C:/Program Files (x86)/Microsoft Office/root/Office16/EXCEL.EXE");
excelSession = new WindowsDriver(new URL("http://127.0.0.1:4723"), capabilities);
excelSession.manage().timeouts().implicitlyWait(1, TimeUnit.SECONDS);
/** Work around to ignore the splash screen */
Thread.sleep(5000);
allWindowHandles = excelSession.getWindowHandles();
excelSession.switchTo().window(allWindowHandles.iterator().next());
/** open a blank document */
excelSession.manage().window().maximize();
excelSession.findElementByAccessibilityId("AIOStartDocument").click();
Webdriver exception: org.openqa.selenium.WebDriverException: Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'DELL3480-2241', ip: '10.11.101.171', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_211' Driver info: io.appium.java_client.windows.WindowsDriver Capabilities {app: "C:\Program Files\Microsoft..., javascriptEnabled: true, platform: WINDOWS, platformName: WINDOWS} Session ID: B0747E7B-6F1B-4282-9374-2B0D3A0EAF0D
Winappdriver logs: POST /session/B0747E7B-6F1B-4282-9374-2B0D3A0EAF0D/timeouts HTTP/1.1 Accept-Encoding: gzip Connection: Keep-Alive Content-Length: 38 Content-Type: application/json; charset=utf-8 Host: 127.0.0.1:4723 User-Agent: selenium/3.141.59 (java windows)
{ "type": "implicit", "ms": 1000 } HTTP/1.1 200 OK Content-Length: 63 Content-Type: application/json
{"sessionId":"B0747E7B-6F1B-4282-9374-2B0D3A0EAF0D","status":0}
Selenium and java-client:
This happens only with specific set of windows machine where as in few other machines we were not able to reproduce this issue. And with in the system where this issue was reported when we clean, close and reopen the server and excel and try again, it works 1 out of 10 times.
I have the same issue with Outlook. It was working fine on the machine and now give this error and I Can't seem to get past it. Can someone please have a look into this