Child 2960 ###!!! ABORT: Aborting on channel error - selenium

When running Selenium 2.53.1 on a Win7Pro machine, I get the error below. I found that it is a bug in Firefox. But as I am using version 49.0.2, I did not expect this error because it was resolved.
How can I resolve this?
Option #1:
I remembered I installed an older version (48.0.2). I removed all versions of FF and installed the latest version. Unfortunatly this did not solve my issue.
Option #2:
When I changed the url, for the acceptance env instead of test, I was able to enter values and process testcases. Might be the SSL certificates???
Note:
As my reputation was not enough to ask my question here I had to ask it in a new one.
Also if more info is needed, I will add it.
2016-11-08 11:22:07,316 - INFO nl.spp.BrowserController - Configuring firefox
2016-11-08 11:22:07,434 - INFO nl.spp.BrowserController - Starting firefox
1478600528072 geckodriver INFO Listening on 127.0.0.1:44190
1478600528098 mozprofile::profile INFO Using profile path C:\Users\AD529~1.DIA\AppData\Local\Temp\rust_mozprofile.wOU06Xtrmvik
1478600528101 geckodriver::marionette INFO Starting browser C:\Program Files (x86)\Mozilla Firefox\firefox.exe
1478600528113 geckodriver::marionette INFO Connecting to Marionette on localhost:51363
1478600530286 Marionette INFO Listening on port 51363
1478600532338 Marionette INFO startBrowser 521e1fd8-3c94-4c4e-a244-cfbf62c951d8
2016-11-08 11:22:12,841 - INFO nl.spp.BrowserController - Firefox loaded.
2016-11-08 11:22:12,862 - DEBUG nl.spp.Controller - Loading: https://cimlamp12/login
2016-11-08 11:22:13,287 - DEBUG nl.spp.FrameWork - Error loading page (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 407 milliseconds
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:32:46'
System info: host: 'Computer0139', ip: '10.3.0.204', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_102'
Driver info: org.openqa.selenium.firefox.MarionetteDriver
Capabilities [{rotatable=false, raisesAccessibilityExceptions=false, marionette=true, appBuildId=20161019084923, version=, platform=XP, proxy={}, command_id=1, specificationLevel=0, acceptSslCerts=false, processId=4600, binary=C:\Program Files (x86)\Mozilla Firefox\firefox.exe, browserVersion=49.0.2, platformVersion=6.1, XULappId={ec8030f7-c20a-464f-9b0e-13a3a9e97384}, browserName=firefox, takesScreenshot=true, takesElementScreenshot=true, platformName=windows_nt, device=desktop, firefox_profile=UEsDBBQACAgIAMNaaEkAAAAAAAAAA...}]
Session ID: 521e1fd8-3c94-4c4e-a244-cfbf62c951d8
2016-11-08 11:22:13,289 - ERROR TestResultsLogger - Error loading page (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 407 milliseconds
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:32:46'
System info: host: 'Computer0139', ip: '10.3.0.204', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_102'
Driver info: org.openqa.selenium.firefox.MarionetteDriver
Capabilities [{rotatable=false, raisesAccessibilityExceptions=false, marionette=true, appBuildId=20161019084923, version=, platform=XP, proxy={}, command_id=1, specificationLevel=0, acceptSslCerts=false, processId=4600, binary=C:\Program Files (x86)\Mozilla Firefox\firefox.exe, browserVersion=49.0.2, platformVersion=6.1, XULappId={ec8030f7-c20a-464f-9b0e-13a3a9e97384}, browserName=firefox, takesScreenshot=true, takesElementScreenshot=true, platformName=windows_nt, device=desktop, firefox_profile=UEsDBBQACAgIAMNaaEkAAAAAAAAAA...}]
Session ID: 521e1fd8-3c94-4c4e-a244-cfbf62c951d8
2016-11-08 11:22:13,305 - ERROR TestResultsLogger - TestCase: TCDI01 failed! 2016-11-08_11-22-13.305
2016-11-08 11:22:13,327 - INFO nl.spp.Controller - Stopping firefox
Child 3732 ###!!! ABORT: Aborting on channel error.: file c:/builds/moz2_slave/m-rel-w32-00000000000000000000/build/src/ipc/glue/MessageChannel.cpp, line 2052
Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died.
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:32:46'
System info: host: 'Computer0139', ip: '10.3.0.204', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_102'
Driver info: driver.version: RemoteWebDriver
Capabilities [{rotatable=false, raisesAccessibilityExceptions=false, marionette=true, appBuildId=20161019084923, version=, platform=XP, proxy={}, command_id=1, specificationLevel=0, acceptSslCerts=false, processId=4036, binary=C:\Program Files (x86)\Mozilla Firefox\firefox.exe, browserVersion=49.0.2, platformVersion=6.1, XULappId={ec8030f7-c20a-464f-9b0e-13a3a9e97384}, browserName=firefox, takesScreenshot=true, takesElementScreenshot=true, platformName=windows_nt, device=desktop, firefox_profile=UEsDBBQACAgIAC9WaEkAAAAAAAAAA...}]
Session ID: 927daba8-9f7c-4e69-ac4c-a0a1ce1b7b39
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:665)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:701)
at org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:526)
at nl.spp.Controller.stopBrowser(Controller.java:213)
at nl.spp.FrameWork.running(FrameWork.java:140)
at nl.spp.FrameWork.start(FrameWork.java:80)
at nl.spp.Apl.main(Apl.java:37)
Caused by: java.lang.IllegalStateException: UnixUtils may not be used on Windows
at org.openqa.selenium.os.ProcessUtils.getProcessId(ProcessUtils.java:189)
at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.getPID(UnixProcess.java:222)
at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.access$3(UnixProcess.java:221)
at org.openqa.selenium.os.UnixProcess.destroy(UnixProcess.java:132)
at org.openqa.selenium.os.CommandLine.destroy(CommandLine.java:155)
at org.openqa.selenium.remote.service.DriverService.stop(DriverService.java:196)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:94)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:644)
... 6 more
The code I use to start FF:
public WebDriver loadBrowser(String strBrowser) {
WebDriver driver = null;
//String Xport = System.getProperty("lmportal.xvfb.id", ":1");
//System.setProperty("webdriver.gecko.driver", "C:\\Programs\\GeckoDriver\\geckodriver.exe");
System.setProperty("webdriver.gecko.driver", "F:\\Project\\GeckoDriver\\wires.exe");
//System.setProperty("webdriver.firefox.marionette", "C:\\Programs\\GeckoDriver\\geckodriver.exe");
if(strBrowser.equals("FireFox")) {
// Start FireFox
log.info("Configuring firefox");
//Now you can initialize marionette driver to launch firefox
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
//Windows config
capabilities.setCapability("binary", "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe");
//Linux config
//capabilities.setCapability("binary", "/usr/bin/firefox");
//setting the profile
FirefoxProfile profile = new FirefoxProfile();
profile.setEnableNativeEvents(true);
profile.setPreference( "intl.accept_languages", "no,en-us,en" );
profile.setPreference( "privacy.clearOnShutdown.cookies", true );
profile.setPreference( "privacy.clearOnShutdown.formdata", true );
profile.setPreference( "privacy.donottrackheader.enabled", true );
profile.setPreference( "browser.tabs.tabMaxWidth", 100 );
profile.setPreference( "browser.cache.disk.capacity", 10240 );
profile.setPreference( "browser.link.open_newwindow.override.external", 2);
capabilities.setCapability(FirefoxDriver.PROFILE, profile);
log.info("Starting firefox");
//setting the environment
driver = new MarionetteDriver(capabilities);
driver.manage().timeouts().implicitlyWait(Long.parseLong(conConfig.getProperty("Implicit wait")), TimeUnit.SECONDS);
log.info("Firefox loaded.");
}
else if(strBrowser.equals("Chrome")) {
log.info("Starting chrome");
System.setProperty("webdriver.chrome.driver", "C:\\Program Files (x86)\\Google\\ChromeDriver2016\\chromedriver.exe");
driver = new ChromeDriver();
driver.manage().timeouts().implicitlyWait(Long.parseLong(conConfig.getProperty("Implicit wait")), TimeUnit.SECONDS);
log.info("Chrome loaded.");
}
return driver;
}

Related

Missing error message from Selenium after button click

I'm doing a simple form submit using the click method:
$this->url('/');
$move = $this->byName('move');
$move->click();
$content = $this->byTag('body')->text();
But I can't understand the error message I get from Selenium:
PHPUnit_Extensions_Selenium2TestCase_WebDriverException:
Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T16:15:40.131Z'
System info: host: 'olle-GA-H81M-S2H', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-51-generic', java.version: '1.8.0_141'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=/tmp/rust_mozprofile.EeZF7cCPXFo3, rotatable=false, timeouts={implicit=0, pageLoad=300000, script=30000}, pageLoadStrategy=normal, moz:headless=false, platform=LINUX, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=56.0, platformVersion=4.4.0-51-generic, moz:processID=6598, browserName=firefox, javascriptEnabled=true, platformName=LINUX}]
Session ID: eae99c32-7401-4892-9190-e242b3b81f5a
I can var_dump the $move button and confirm that is no null. Any ideas?
The PHP backtrace:
vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase/Driver.php:165
vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase/Driver.php:175
vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php:100
tests/questions/DateTimeValidationTest.php:215
vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase.php:371
vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase.php:337
Edit: Above was the gecko driver. I get a similar error for the Facebook driver:
Facebook\WebDriver\Exception\UnrecognizedExceptionException:
Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T16:15:40.131Z'
System info: host: 'olle-GA-H81M-S2H', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-51-generic', java.version: '1.8.0_141'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=/tmp/rust_mozprofile.TpTQ5MWyL1hl, rotatable=false, timeouts={implicit=0, pageLoad=300000, script=30000}, pageLoadStrategy=normal, moz:headless=false, platform=LINUX, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=56.0, platformVersion=4.4.0-51-generic, moz:processID=9146, browserName=firefox, javascriptEnabled=true, platformName=LINUX}]
Session ID: 56036593-dc86-4132-9d0f-78beb369b35c
vendor/facebook/webdriver/lib/Exception/WebDriverException.php:158
vendor/facebook/webdriver/lib/Remote/HttpCommandExecutor.php:320
vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php:535
vendor/facebook/webdriver/lib/Remote/RemoteExecuteMethod.php:40
vendor/facebook/webdriver/lib/Remote/RemoteWebElement.php:81
tests/questions/FacebookDriverTest.php:42
The HTML for the button is:
<button type="submit" value="movesubmit" name="move" accesskey="l" class="ls-move-btn ls-move-submit-btn btn btn-lg btn-primary">
Submeter
</button>
Edit 2: Exception from selenium:
15:35:15.177 INFO - Executing: [find element: By.name: move])
15:35:15.193 INFO - Done: [find element: By.name: move]
1509374115699 addons.productaddons INFO downloadXHR File download. status=200
1509374115702 addons.productaddons INFO Downloaded file will be saved to /tmp/tmpaddon-e50bf4
1509374116634 DeferredSave.webext.sc.lz4 DEBUG Starting write
1509374116639 DeferredSave.webext.sc.lz4 DEBUG Write succeeded
15:35:17.196 INFO - Executing: [click: 0 [[FirefoxDriver: firefox on LINUX (32c1dfec-9af4-448f-86fa-3a41035bf6b5)] -> name: move]])
15:35:17.501 WARN - Exception thrown
org.openqa.selenium.ElementNotInteractableException:
Edit 3: Mystery solved, I had two buttons with the same name, and the first one was hidden. Hence, the exception. Solved by putting a proper ID on the element I want to interact with.

How to debug SessionNotCreatedException?

How to debug SessionNotCreatedException in Firefox/Selenium?
1501668018402 geckodriver INFO Listening on 127.0.0.1:6748
1501668025463 geckodriver::marionette INFO Starting browser C:\Program Files (x86)\Mozilla Firefox\firefox.exe with args ["-marionette"]
1501668037220 Marionette INFO Listening on port 53205
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{moz:firefoxOptions={binary=Optional.empty, args=[], legacy=null, logLevel=null, prefs={}, profile=null}}], required capabilities = Capabilities [{moz:firefoxOptions={binary=Optional.empty, args=[], legacy=null, logLevel=null, prefs={}, profile=null}}]
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'CELKON-RND-PC', ip: '192.168.1.6', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_131'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:604)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:244)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:218)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:125)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:121)
at testpack.testclass.main(testclass.java:16)

Unable to launch firefox with selenium grid 3.0.1 gecko driver 0.11.1 firefox 50.0.1

Trying to launch firefox with selenium grid is through exception as below:
org.openqa.selenium.sessionnotcreatedexception
Code I am using is as below:
if(useRemoteWebDriver){
URL seleniumGridURL = new URL(System.getProperty("gridURL"));
String desiredBrowserVersion = System.getProperty("desiredBrowserVersion");
String desiredPlatform = System.getProperty("desiredPlatform");
if (!desiredPlatform.isEmpty())
if ((null != desiredPlatform)) {
desiredCapabilities.setPlatform(Platform.valueOf(desiredPlatform.toUpperCase()));
}
if (null != desiredBrowserVersion && !desiredBrowserVersion.isEmpty()){
desiredCapabilities.setVersion(desiredBrowserVersion);
}
webDriver = new RemoteWebDriver(seleniumGridURL, desiredCapabilities);
}else{
webDriver = selectedDriverType.getWebDriverObject(desiredCapabilities);
}
and I am trying to run it from command line using
mvn clean install -Dremote=true -DseleniumGridURL=http://localhost:5555/wd/hub -Dbrowser=firefox -Dwebdriver.gecko.driver="E:\GeckoDriver\geckodriver.exe" -DbrowserVersion="50.0.1"
this is giving me the following exception
org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{marionette=true, binary=C:\Program Files (x86)\Mozilla Firefox\firefox.exe, browserName=firefox, version=50.0.1, platform=ANY}], required capabilities = Capabilities [{}]
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
System info: host: 'exipc0006', ip: '172.16.12.123', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_111'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:91)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:155)
at com.HomLuvAutomation.WebDriverThread.instantiateWebDriver(WebDriverThread.java:89)
at com.HomLuvAutomation.WebDriverThread.getDriver(WebDriverThread.java:40)
at com.HomLuvAutomation.DriverFactory.getDriver(DriverFactory.java:46)
at com.HomLuvAutomation.BasicSearchWD.exampleOfTestNgMaven(BasicSearchWD.java:22)
at com.HomLuvAutomation.BasicSearchWD.austinSearch(BasicSearchWD.java:56)

"UnreachableBrowserException" and "UnixUtils may not be used on Windows exception" after driver.quit while using MarionetteDriver

Environment- Firefox 48.0.2 and Selenium 3.0.0-beta2 versions ,i am getting below error -
1472824777259 Marionette INFO Listening on port 61096 [Child 5848]
WARNING: pipe error: 109: file
c:/builds/moz2_slave/m-rel-w32-00000000000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc,
line 343
[Child 4048] ###!!! ABORT: Aborting on channel error.: file
c:/builds/moz2_slave/m-rel-w32-00000000000000000000/build/src/ipc/glue/MessageChannel.cpp,
line 2046 Exception in thread "main"
org.openqa.selenium.remote.UnreachableBrowserException: Error
communicating with the remote browser. It may have died. Build info:
version: '3.0.0-beta2', revision: '2aa21c1', time: '2016-08-02
15:03:28 -0700' System info: host: 'VM7-JDB-068', ip: '10.60.88.67',
os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1',
java.version: '1.8.0_51' Driver info: driver.version: RemoteWebDriver
Capabilities [{rotatable=false, raisesAccessibilityExceptions=false,
marionette=true, appBuildId=20160823121617, version=, platform=XP,
proxy={}, command_id=1, specificationLevel=0, acceptSslCerts=false,
browserVersion=48.0.2, platformVersion=6.1,
XULappId={ec8030f7-c20a-464f-9b0e-13a3a9e97384}, browserName=Firefox,
takesScreenshot=true, takesElementScreenshot=true,
platformName=Windows_NT, device=desktop}] Session ID:
499ab4bb-406d-4252-8b5d-808b22831595 at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:670)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:706)
at
org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:531)
at firefox_java.sample.main(sample.java:19) Caused by:
java.lang.IllegalStateException: UnixUtils may not be used on Windows
at
org.openqa.selenium.os.ProcessUtils.getProcessId(ProcessUtils.java:188)
at
org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.getPID(UnixProcess.java:222)
at
org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.access$300(UnixProcess.java:201)
at org.openqa.selenium.os.UnixProcess.destroy(UnixProcess.java:132)
at org.openqa.selenium.os.CommandLine.destroy(CommandLine.java:155)
at
org.openqa.selenium.remote.service.DriverService.stop(DriverService.java:196)
at
org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:94)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:649)
... 3 more on driver.quit();
Here is my Java code:
String marionetteDriverLocation = "\\Lib\\geckodriver.exe";
System.setProperty("webdriver.gecko.driver", marionetteDriverLocation);
WebDriver driver = new FirefoxDriver();
driver.get("https://www.google.co.in");
driver.quit();
Could you please help .
Thanks
Below is the working copy that I just now tried. If it doesn't work, then there should be problem with selenium jar or gecodriver.exe you are using.
public class MarrionateTest {
public static void main(String[] args) {
System.setProperty("webdriver.gecko.driver", System.getProperty("user.dir") + "/BrowserDrivers/geckodriver.exe");
DesiredCapabilities cap = DesiredCapabilities.firefox();
cap.setCapability("marionette", true);
WebDriver driver = new MarionetteDriver(cap);
driver.get("http://www.seleniumhq.org");
driver.close();
}
}
You have used MarionetteDriver but initializing FirefoxDriver().
Please try with WebDriver driver = new MarionetteDriver(cap); it should work.

WebDriverBackedSelenium in Internet Explorer is not working

An error can be seen while running the test in Selenium, I have tried removing and adding the capabilities but in vain:
DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
WebDriver driver = new InternetExplorerDriver(capabilities);
WebDriverBackedSelenium selenium = new WebDriverBackedSelenium(driver, url);
Thread.sleep(3000);
selenium.open(url);
driver.manage().timeouts().setScriptTimeout(30, TimeUnit.SECONDS);
selenium.type("userId", "TEst");
The error is thrown because of the line selenium.type("userId", "TEst") and the error is as follows:
JavaScript error (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 81 milliseconds
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:18:15'
System info: host: 'slc05apo', ip: '10.241.115.70', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_26'
Session ID: 4368aa6a-ba4a-42a9-8428-1ce9a8f71dcc
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{platform=WINDOWS, javascriptEnabled=true, elementScrollBehavior=0, enablePersistentHover=true, ignoreZoomSetting=false, ie.ensureCleanSession=false, browserName=internet explorer, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss, version=8, ie.usePerProcessProxy=false, cssSelectorsEnabled=true, ignoreProtectedModeSettings=false, requireWindowFocus=false, handlesAlerts=true, initialBrowserUrl=http://localhost:39326/, ie.forceCreateProcessApi=false, nativeEvents=true, browserAttachTimeout=0, ie.browserCommandLineSwitches=, takesScreenshot=true}]
But no error can be seen if I use this:
WebDriver driver = new InternetExplorerDriver( DesiredCapabilities.internetExplorer());
driver.get(url);
driver.manage().timeouts().setScriptTimeout(30, TimeUnit.SECONDS);
driver.findElement(By.id("userId")).sendKeys("test");
But I want to use the first given case. Please help.
Whatever the capabilities you are setting, should be passed when instantiating the driver.
Please change this
WebDriver driver = new InternetExplorerDriver( DesiredCapabilities.internetExplorer());
to
WebDriver driver = new InternetExplorerDriver(capabilities);
Hope this works.