I am using Selenium WebDriver to automate VMWare HML5. When I get to the end to launch the VM Remote Console there is an alert message that I can not inspect to click on the message. There are two choices 1) "Open VM Ware Remote Console" 2)"Don't open" I've tried the following:
Alert alert = driver.switchTo().alert();
alert.accept();
I got the following error:
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8), userDataDir=C:\Users\USERNAME~1\AppData\Local\Temp\scoped_dir18824_10625}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=60.0.3112.101, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=}]
Session ID: 35b8e59a225daf47796fe483450924f0
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:671)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:694)
at org.openqa.selenium.remote.RemoteWebDriver$RemoteTargetLocator.alert(RemoteWebDriver.java:1020)
at browser.VMTasks.launchRemoteConsole(VMTasks.java:624)
at bro
wser.html5TEST.main(html5TEST.java:80)
I also tried to sendKeys to TAB to the correct choice and ENTER since the focus is on the alert and the rest of the page can not be interacted with while the alert is there but nothing is working for the popup alert.