Exception while executing the code in IE11

69 views
Skip to first unread message

abhi sr

unread,
May 22, 2015, 1:12:19 AM5/22/15
to seleniu...@googlegroups.com
public static void main(String[] args) throws IOException 
{
System.setProperty("webdriver.ie.driver","D:\\abhi\\selenium\\IEDriverServer.exe");
WebDriver driver = new InternetExplorerDriver();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);
driver.manage().timeouts().pageLoadTimeout(60, TimeUnit.SECONDS);
               // handling window security pop up
Runtime.getRuntime().exec("D:\\abhi\\selenium\\topuser1_branch.exe");

              // navigating to url
driver.findElement(By.linkText("Sign Out")).click();
}

for this code im getting below exception.

Listening on port 2252
Exception in thread "main" org.openqa.selenium.UnhandledAlertException: Modal dialog present: 
Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50'
System info: host: 'INHYDAMANDALA', ip: '10.138.70.90', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_25'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{browserAttachTimeout=0, enablePersistentHover=true, ie.forceCreateProcessApi=false, ie.usePerProcessProxy=false, ignoreZoomSetting=false, handlesAlerts=true, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=http://localhost:2252/, takesScreenshot=true, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=dismiss}]
Session ID: 0de40ccf-e72f-4215-8baa-6a3fe965fca7
*** Element info: {Using=link text, value=Sign Out}
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:204)
at org.openqa.selenium.remote.ErrorHandler.createUnhandledAlertException(ErrorHandler.java:185)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:152)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:352)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByLinkText(RemoteWebDriver.java:401)
at org.openqa.selenium.By$ByLinkText.findElement(By.java:242)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:344)
at seleniumStakeholderTesting.IexplorersmdmTesting.main(IexplorersmdmTesting.java:37)


pls suggest me solution


Alexra

unread,
May 22, 2015, 1:31:08 PM5/22/15
to seleniu...@googlegroups.com
Please verify Enable Protected Mode is checked for both Internet, Local Intranet, Trusted sites and restricted sites.
Reply all
Reply to author
Forward
0 new messages