unable to create new remote session with remotewebdriver and gecko driver SessionNotCreatedException with...
up vote
1
down vote
favorite
I am having issues with connecting selenium webdriver with firefox using GeckoDriver.
My Firefox version is - Mozilla Firefox 52.8.1
pom.xml
<properties>
<selenium.version>3.3.0</selenium.version>
</properties>
<!-- Selenium -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<version>${selenium.version}</version>
</dependency>
Command to start hub -
/data1/jdk-8u131-linux-x64/jdk1.8.0_131/bin/java -jar $BUILD_REPOSITORY/org/seleniumhq/seleniuselenium-server-standalone/3.141.5/selenium-server-standalone-3.141.5.jar -role hub -port 4444
Command to start Node -
/usr/java64/jre1.8.0_181-amd64/bin/java -Dwebdriver.gecko.driver=/usr/g/ctuser/geckodriver -jar selenium-server-standalone-3.141.5.jar -role node -huhttp://3.57.51.87:4444/grid/register -host 3.231.15.68
GeckoDriver - geckodriver-v0.15.0-linux64.tar.gz
Test Code -
public static void main(String args) {
System.setProperty("webdriver.gecko.driver", "/export/data1/selenium/geckodriver");
DesiredCapabilities firefox = DesiredCapabilities.firefox();
firefox.setBrowserName("firefox");
firefox.setPlatform(Platform.UNIX);
RemoteWebDriver remoteDriver = new RemoteWebDriver(firefox);
remoteDriver.get("http://localhost:7005/");
System.out.println(remoteDriver.getTitle());
remoteDriver.quit();
}
Getting Exception -
Exception in thread "main"
org.openqa.selenium.SessionNotCreatedException: Unable to create new
remote session. desired capabilities = Capabilities {browserName:
firefox, marionette: true, platform: UNIX, version: } Build info:
version: '3.141.5', revision: 'd54ebd709a', time:
'2018-11-06T11:58:47' System info: host: 'liblab8.site', ip:
'3.231.15.68', os.name: 'Linux', os.arch: 'amd64', os.version:
'3.0.101-0.47.106.35.1.15690.0.PTF-default', java.version: '1.8.0_181'
Driver info: driver.version: unknown Command duration or timeout: 0
milliseconds at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)
at
org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:363)
at
org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:113)
at
org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
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.(RemoteWebDriver.java:131)
at
org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:158)
at
org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:148)
at com.ge.test.Test1.main(Test1.java:16) Caused by:
org.openqa.selenium.SessionNotCreatedException: Unable to create new
remote session. desired capabilities = Capabilities {browserName:
firefox, marionette: true, platform: UNIX, version: } Build info:
version: '3.141.5', revision: 'd54ebd709a', time:
'2018-11-06T11:58:47' System info: host: 'liblab8.site', ip:
'3.231.15.68', os.name: 'Linux', os.arch: 'amd64', os.version:
'3.0.101-0.47.106.35.1.15690.0.PTF-default', java.version: '1.8.0_181'
Driver info: driver.version: unknown Build info: version: '3.3.0',
revision: 'b526bd5b41', time: '2017-03-07 19:26:04 +0000' System info:
host: 'ctwdof067.am.health.ge.com', ip: '3.57.51.87', os.name:
'Linux', os.arch: 'amd64', os.version: '3.0.101-0.40-default',
java.version: '1.8.0_131' Driver info: driver.version: unknown at
org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:87)
at
org.openqa.selenium.grid.session.remote.RemoteSession$Factory.performHandshake(RemoteSession.java:147)
at
org.openqa.selenium.grid.session.remote.ServicedSession$Factory.apply(ServicedSession.java:161)
at
org.openqa.selenium.remote.server.ActiveSessionFactory.lambda$apply$12(ActiveSessionFactory.java:180)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$11$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at
java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source) at
java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown
Source) at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at
java.util.stream.ReferencePipeline.findFirst(Unknown Source) at
org.openqa.selenium.remote.server.ActiveSessionFactory.apply(ActiveSessionFactory.java:183)
at
org.openqa.selenium.remote.server.NewSessionPipeline.lambda$null$2(NewSessionPipeline.java:66)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at
java.util.Collections$2.tryAdvance(Unknown Source) at
java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown
Source) at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at
java.util.stream.ReferencePipeline.findFirst(Unknown Source) at
org.openqa.selenium.remote.server.NewSessionPipeline.lambda$createNewSession$3(NewSessionPipeline.java:69)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.DistinctOps$1$2.accept(Unknown Source) at
java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at
java.util.stream.Streams$StreamBuilderImpl.tryAdvance(Unknown Source)
at java.util.stream.Streams$ConcatSpliterator.tryAdvance(Unknown
Source) at
java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown
Source) at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at
java.util.stream.ReferencePipeline.findFirst(Unknown Source) at
org.openqa.selenium.remote.server.NewSessionPipeline.createNewSession(NewSessionPipeline.java:72)
at
org.openqa.selenium.remote.server.commandhandler.BeginSession.execute(BeginSession.java:65)
at
org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$0(WebDriverServlet.java:235)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source) at java.util.concurrent.FutureTask.run(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at
java.lang.Thread.run(Unknown Source)
Hub Console -
01:47:49.231 INFO [RequestHandler.process] - Got a request to create a
new session: Capabilities {browserName: firefox, marionette: true,
platform: UNIX, version: } 01:47:49.232 INFO [TestSlot.getNewSession]
- Trying to create a new session on test slot {server:CONFIG_UUID=e18d691a-1d36-4b44-8526-777d4443d078,
seleniumProtocol=WebDriver, marionette=true, browserName=firefox,
maxInstances=5, platformName=LINUX, platform=LINUX}
Node Console -
01:43:34.137 INFO [ActiveSessionFactory.apply] - Capabilities are: {
"browserName": "firefox", "marionette": true, "platform": "UNIX",
"version": "" } 01:43:34.137 INFO
[ActiveSessionFactory.lambda$apply$11] - Matched factory
org.openqa.selenium.grid.session.remote.ServicedSession$Factory
(provider: org.openqa.selenium.firefox.GeckoDriverService)
1542008614143 geckodriver INFO Listening on 127.0.0.1:43589
1542008614199 mozprofile::profile INFO Using profile path
/tmp/rust_mozprofile.bGje3sR6MQxe
1542008614199 geckodriver::marionette INFO Starting browser
/usr/bin/firefox with args
1542008614201 geckodriver::marionette INFO Connecting to Marionette on
localhost:56293 1542008615126 Marionette INFO Listening on port 56293
NPP_GetValue() NPP_GetValue() NPP_GetValue() NPP_GetValue()
I don't understand what is going on here. Please help
selenium selenium-webdriver selenium-grid geckodriver gecko
add a comment |
up vote
1
down vote
favorite
I am having issues with connecting selenium webdriver with firefox using GeckoDriver.
My Firefox version is - Mozilla Firefox 52.8.1
pom.xml
<properties>
<selenium.version>3.3.0</selenium.version>
</properties>
<!-- Selenium -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<version>${selenium.version}</version>
</dependency>
Command to start hub -
/data1/jdk-8u131-linux-x64/jdk1.8.0_131/bin/java -jar $BUILD_REPOSITORY/org/seleniumhq/seleniuselenium-server-standalone/3.141.5/selenium-server-standalone-3.141.5.jar -role hub -port 4444
Command to start Node -
/usr/java64/jre1.8.0_181-amd64/bin/java -Dwebdriver.gecko.driver=/usr/g/ctuser/geckodriver -jar selenium-server-standalone-3.141.5.jar -role node -huhttp://3.57.51.87:4444/grid/register -host 3.231.15.68
GeckoDriver - geckodriver-v0.15.0-linux64.tar.gz
Test Code -
public static void main(String args) {
System.setProperty("webdriver.gecko.driver", "/export/data1/selenium/geckodriver");
DesiredCapabilities firefox = DesiredCapabilities.firefox();
firefox.setBrowserName("firefox");
firefox.setPlatform(Platform.UNIX);
RemoteWebDriver remoteDriver = new RemoteWebDriver(firefox);
remoteDriver.get("http://localhost:7005/");
System.out.println(remoteDriver.getTitle());
remoteDriver.quit();
}
Getting Exception -
Exception in thread "main"
org.openqa.selenium.SessionNotCreatedException: Unable to create new
remote session. desired capabilities = Capabilities {browserName:
firefox, marionette: true, platform: UNIX, version: } Build info:
version: '3.141.5', revision: 'd54ebd709a', time:
'2018-11-06T11:58:47' System info: host: 'liblab8.site', ip:
'3.231.15.68', os.name: 'Linux', os.arch: 'amd64', os.version:
'3.0.101-0.47.106.35.1.15690.0.PTF-default', java.version: '1.8.0_181'
Driver info: driver.version: unknown Command duration or timeout: 0
milliseconds at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)
at
org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:363)
at
org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:113)
at
org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
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.(RemoteWebDriver.java:131)
at
org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:158)
at
org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:148)
at com.ge.test.Test1.main(Test1.java:16) Caused by:
org.openqa.selenium.SessionNotCreatedException: Unable to create new
remote session. desired capabilities = Capabilities {browserName:
firefox, marionette: true, platform: UNIX, version: } Build info:
version: '3.141.5', revision: 'd54ebd709a', time:
'2018-11-06T11:58:47' System info: host: 'liblab8.site', ip:
'3.231.15.68', os.name: 'Linux', os.arch: 'amd64', os.version:
'3.0.101-0.47.106.35.1.15690.0.PTF-default', java.version: '1.8.0_181'
Driver info: driver.version: unknown Build info: version: '3.3.0',
revision: 'b526bd5b41', time: '2017-03-07 19:26:04 +0000' System info:
host: 'ctwdof067.am.health.ge.com', ip: '3.57.51.87', os.name:
'Linux', os.arch: 'amd64', os.version: '3.0.101-0.40-default',
java.version: '1.8.0_131' Driver info: driver.version: unknown at
org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:87)
at
org.openqa.selenium.grid.session.remote.RemoteSession$Factory.performHandshake(RemoteSession.java:147)
at
org.openqa.selenium.grid.session.remote.ServicedSession$Factory.apply(ServicedSession.java:161)
at
org.openqa.selenium.remote.server.ActiveSessionFactory.lambda$apply$12(ActiveSessionFactory.java:180)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$11$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at
java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source) at
java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown
Source) at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at
java.util.stream.ReferencePipeline.findFirst(Unknown Source) at
org.openqa.selenium.remote.server.ActiveSessionFactory.apply(ActiveSessionFactory.java:183)
at
org.openqa.selenium.remote.server.NewSessionPipeline.lambda$null$2(NewSessionPipeline.java:66)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at
java.util.Collections$2.tryAdvance(Unknown Source) at
java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown
Source) at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at
java.util.stream.ReferencePipeline.findFirst(Unknown Source) at
org.openqa.selenium.remote.server.NewSessionPipeline.lambda$createNewSession$3(NewSessionPipeline.java:69)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.DistinctOps$1$2.accept(Unknown Source) at
java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at
java.util.stream.Streams$StreamBuilderImpl.tryAdvance(Unknown Source)
at java.util.stream.Streams$ConcatSpliterator.tryAdvance(Unknown
Source) at
java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown
Source) at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at
java.util.stream.ReferencePipeline.findFirst(Unknown Source) at
org.openqa.selenium.remote.server.NewSessionPipeline.createNewSession(NewSessionPipeline.java:72)
at
org.openqa.selenium.remote.server.commandhandler.BeginSession.execute(BeginSession.java:65)
at
org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$0(WebDriverServlet.java:235)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source) at java.util.concurrent.FutureTask.run(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at
java.lang.Thread.run(Unknown Source)
Hub Console -
01:47:49.231 INFO [RequestHandler.process] - Got a request to create a
new session: Capabilities {browserName: firefox, marionette: true,
platform: UNIX, version: } 01:47:49.232 INFO [TestSlot.getNewSession]
- Trying to create a new session on test slot {server:CONFIG_UUID=e18d691a-1d36-4b44-8526-777d4443d078,
seleniumProtocol=WebDriver, marionette=true, browserName=firefox,
maxInstances=5, platformName=LINUX, platform=LINUX}
Node Console -
01:43:34.137 INFO [ActiveSessionFactory.apply] - Capabilities are: {
"browserName": "firefox", "marionette": true, "platform": "UNIX",
"version": "" } 01:43:34.137 INFO
[ActiveSessionFactory.lambda$apply$11] - Matched factory
org.openqa.selenium.grid.session.remote.ServicedSession$Factory
(provider: org.openqa.selenium.firefox.GeckoDriverService)
1542008614143 geckodriver INFO Listening on 127.0.0.1:43589
1542008614199 mozprofile::profile INFO Using profile path
/tmp/rust_mozprofile.bGje3sR6MQxe
1542008614199 geckodriver::marionette INFO Starting browser
/usr/bin/firefox with args
1542008614201 geckodriver::marionette INFO Connecting to Marionette on
localhost:56293 1542008615126 Marionette INFO Listening on port 56293
NPP_GetValue() NPP_GetValue() NPP_GetValue() NPP_GetValue()
I don't understand what is going on here. Please help
selenium selenium-webdriver selenium-grid geckodriver gecko
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am having issues with connecting selenium webdriver with firefox using GeckoDriver.
My Firefox version is - Mozilla Firefox 52.8.1
pom.xml
<properties>
<selenium.version>3.3.0</selenium.version>
</properties>
<!-- Selenium -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<version>${selenium.version}</version>
</dependency>
Command to start hub -
/data1/jdk-8u131-linux-x64/jdk1.8.0_131/bin/java -jar $BUILD_REPOSITORY/org/seleniumhq/seleniuselenium-server-standalone/3.141.5/selenium-server-standalone-3.141.5.jar -role hub -port 4444
Command to start Node -
/usr/java64/jre1.8.0_181-amd64/bin/java -Dwebdriver.gecko.driver=/usr/g/ctuser/geckodriver -jar selenium-server-standalone-3.141.5.jar -role node -huhttp://3.57.51.87:4444/grid/register -host 3.231.15.68
GeckoDriver - geckodriver-v0.15.0-linux64.tar.gz
Test Code -
public static void main(String args) {
System.setProperty("webdriver.gecko.driver", "/export/data1/selenium/geckodriver");
DesiredCapabilities firefox = DesiredCapabilities.firefox();
firefox.setBrowserName("firefox");
firefox.setPlatform(Platform.UNIX);
RemoteWebDriver remoteDriver = new RemoteWebDriver(firefox);
remoteDriver.get("http://localhost:7005/");
System.out.println(remoteDriver.getTitle());
remoteDriver.quit();
}
Getting Exception -
Exception in thread "main"
org.openqa.selenium.SessionNotCreatedException: Unable to create new
remote session. desired capabilities = Capabilities {browserName:
firefox, marionette: true, platform: UNIX, version: } Build info:
version: '3.141.5', revision: 'd54ebd709a', time:
'2018-11-06T11:58:47' System info: host: 'liblab8.site', ip:
'3.231.15.68', os.name: 'Linux', os.arch: 'amd64', os.version:
'3.0.101-0.47.106.35.1.15690.0.PTF-default', java.version: '1.8.0_181'
Driver info: driver.version: unknown Command duration or timeout: 0
milliseconds at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)
at
org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:363)
at
org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:113)
at
org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
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.(RemoteWebDriver.java:131)
at
org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:158)
at
org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:148)
at com.ge.test.Test1.main(Test1.java:16) Caused by:
org.openqa.selenium.SessionNotCreatedException: Unable to create new
remote session. desired capabilities = Capabilities {browserName:
firefox, marionette: true, platform: UNIX, version: } Build info:
version: '3.141.5', revision: 'd54ebd709a', time:
'2018-11-06T11:58:47' System info: host: 'liblab8.site', ip:
'3.231.15.68', os.name: 'Linux', os.arch: 'amd64', os.version:
'3.0.101-0.47.106.35.1.15690.0.PTF-default', java.version: '1.8.0_181'
Driver info: driver.version: unknown Build info: version: '3.3.0',
revision: 'b526bd5b41', time: '2017-03-07 19:26:04 +0000' System info:
host: 'ctwdof067.am.health.ge.com', ip: '3.57.51.87', os.name:
'Linux', os.arch: 'amd64', os.version: '3.0.101-0.40-default',
java.version: '1.8.0_131' Driver info: driver.version: unknown at
org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:87)
at
org.openqa.selenium.grid.session.remote.RemoteSession$Factory.performHandshake(RemoteSession.java:147)
at
org.openqa.selenium.grid.session.remote.ServicedSession$Factory.apply(ServicedSession.java:161)
at
org.openqa.selenium.remote.server.ActiveSessionFactory.lambda$apply$12(ActiveSessionFactory.java:180)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$11$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at
java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source) at
java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown
Source) at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at
java.util.stream.ReferencePipeline.findFirst(Unknown Source) at
org.openqa.selenium.remote.server.ActiveSessionFactory.apply(ActiveSessionFactory.java:183)
at
org.openqa.selenium.remote.server.NewSessionPipeline.lambda$null$2(NewSessionPipeline.java:66)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at
java.util.Collections$2.tryAdvance(Unknown Source) at
java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown
Source) at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at
java.util.stream.ReferencePipeline.findFirst(Unknown Source) at
org.openqa.selenium.remote.server.NewSessionPipeline.lambda$createNewSession$3(NewSessionPipeline.java:69)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.DistinctOps$1$2.accept(Unknown Source) at
java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at
java.util.stream.Streams$StreamBuilderImpl.tryAdvance(Unknown Source)
at java.util.stream.Streams$ConcatSpliterator.tryAdvance(Unknown
Source) at
java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown
Source) at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at
java.util.stream.ReferencePipeline.findFirst(Unknown Source) at
org.openqa.selenium.remote.server.NewSessionPipeline.createNewSession(NewSessionPipeline.java:72)
at
org.openqa.selenium.remote.server.commandhandler.BeginSession.execute(BeginSession.java:65)
at
org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$0(WebDriverServlet.java:235)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source) at java.util.concurrent.FutureTask.run(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at
java.lang.Thread.run(Unknown Source)
Hub Console -
01:47:49.231 INFO [RequestHandler.process] - Got a request to create a
new session: Capabilities {browserName: firefox, marionette: true,
platform: UNIX, version: } 01:47:49.232 INFO [TestSlot.getNewSession]
- Trying to create a new session on test slot {server:CONFIG_UUID=e18d691a-1d36-4b44-8526-777d4443d078,
seleniumProtocol=WebDriver, marionette=true, browserName=firefox,
maxInstances=5, platformName=LINUX, platform=LINUX}
Node Console -
01:43:34.137 INFO [ActiveSessionFactory.apply] - Capabilities are: {
"browserName": "firefox", "marionette": true, "platform": "UNIX",
"version": "" } 01:43:34.137 INFO
[ActiveSessionFactory.lambda$apply$11] - Matched factory
org.openqa.selenium.grid.session.remote.ServicedSession$Factory
(provider: org.openqa.selenium.firefox.GeckoDriverService)
1542008614143 geckodriver INFO Listening on 127.0.0.1:43589
1542008614199 mozprofile::profile INFO Using profile path
/tmp/rust_mozprofile.bGje3sR6MQxe
1542008614199 geckodriver::marionette INFO Starting browser
/usr/bin/firefox with args
1542008614201 geckodriver::marionette INFO Connecting to Marionette on
localhost:56293 1542008615126 Marionette INFO Listening on port 56293
NPP_GetValue() NPP_GetValue() NPP_GetValue() NPP_GetValue()
I don't understand what is going on here. Please help
selenium selenium-webdriver selenium-grid geckodriver gecko
I am having issues with connecting selenium webdriver with firefox using GeckoDriver.
My Firefox version is - Mozilla Firefox 52.8.1
pom.xml
<properties>
<selenium.version>3.3.0</selenium.version>
</properties>
<!-- Selenium -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<version>${selenium.version}</version>
</dependency>
Command to start hub -
/data1/jdk-8u131-linux-x64/jdk1.8.0_131/bin/java -jar $BUILD_REPOSITORY/org/seleniumhq/seleniuselenium-server-standalone/3.141.5/selenium-server-standalone-3.141.5.jar -role hub -port 4444
Command to start Node -
/usr/java64/jre1.8.0_181-amd64/bin/java -Dwebdriver.gecko.driver=/usr/g/ctuser/geckodriver -jar selenium-server-standalone-3.141.5.jar -role node -huhttp://3.57.51.87:4444/grid/register -host 3.231.15.68
GeckoDriver - geckodriver-v0.15.0-linux64.tar.gz
Test Code -
public static void main(String args) {
System.setProperty("webdriver.gecko.driver", "/export/data1/selenium/geckodriver");
DesiredCapabilities firefox = DesiredCapabilities.firefox();
firefox.setBrowserName("firefox");
firefox.setPlatform(Platform.UNIX);
RemoteWebDriver remoteDriver = new RemoteWebDriver(firefox);
remoteDriver.get("http://localhost:7005/");
System.out.println(remoteDriver.getTitle());
remoteDriver.quit();
}
Getting Exception -
Exception in thread "main"
org.openqa.selenium.SessionNotCreatedException: Unable to create new
remote session. desired capabilities = Capabilities {browserName:
firefox, marionette: true, platform: UNIX, version: } Build info:
version: '3.141.5', revision: 'd54ebd709a', time:
'2018-11-06T11:58:47' System info: host: 'liblab8.site', ip:
'3.231.15.68', os.name: 'Linux', os.arch: 'amd64', os.version:
'3.0.101-0.47.106.35.1.15690.0.PTF-default', java.version: '1.8.0_181'
Driver info: driver.version: unknown Command duration or timeout: 0
milliseconds at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)
at
org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:363)
at
org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:113)
at
org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
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.(RemoteWebDriver.java:131)
at
org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:158)
at
org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:148)
at com.ge.test.Test1.main(Test1.java:16) Caused by:
org.openqa.selenium.SessionNotCreatedException: Unable to create new
remote session. desired capabilities = Capabilities {browserName:
firefox, marionette: true, platform: UNIX, version: } Build info:
version: '3.141.5', revision: 'd54ebd709a', time:
'2018-11-06T11:58:47' System info: host: 'liblab8.site', ip:
'3.231.15.68', os.name: 'Linux', os.arch: 'amd64', os.version:
'3.0.101-0.47.106.35.1.15690.0.PTF-default', java.version: '1.8.0_181'
Driver info: driver.version: unknown Build info: version: '3.3.0',
revision: 'b526bd5b41', time: '2017-03-07 19:26:04 +0000' System info:
host: 'ctwdof067.am.health.ge.com', ip: '3.57.51.87', os.name:
'Linux', os.arch: 'amd64', os.version: '3.0.101-0.40-default',
java.version: '1.8.0_131' Driver info: driver.version: unknown at
org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:87)
at
org.openqa.selenium.grid.session.remote.RemoteSession$Factory.performHandshake(RemoteSession.java:147)
at
org.openqa.selenium.grid.session.remote.ServicedSession$Factory.apply(ServicedSession.java:161)
at
org.openqa.selenium.remote.server.ActiveSessionFactory.lambda$apply$12(ActiveSessionFactory.java:180)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$11$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at
java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source) at
java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown
Source) at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at
java.util.stream.ReferencePipeline.findFirst(Unknown Source) at
org.openqa.selenium.remote.server.ActiveSessionFactory.apply(ActiveSessionFactory.java:183)
at
org.openqa.selenium.remote.server.NewSessionPipeline.lambda$null$2(NewSessionPipeline.java:66)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at
java.util.Collections$2.tryAdvance(Unknown Source) at
java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown
Source) at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at
java.util.stream.ReferencePipeline.findFirst(Unknown Source) at
org.openqa.selenium.remote.server.NewSessionPipeline.lambda$createNewSession$3(NewSessionPipeline.java:69)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.DistinctOps$1$2.accept(Unknown Source) at
java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at
java.util.stream.Streams$StreamBuilderImpl.tryAdvance(Unknown Source)
at java.util.stream.Streams$ConcatSpliterator.tryAdvance(Unknown
Source) at
java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown
Source) at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at
java.util.stream.ReferencePipeline.findFirst(Unknown Source) at
org.openqa.selenium.remote.server.NewSessionPipeline.createNewSession(NewSessionPipeline.java:72)
at
org.openqa.selenium.remote.server.commandhandler.BeginSession.execute(BeginSession.java:65)
at
org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$0(WebDriverServlet.java:235)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source) at java.util.concurrent.FutureTask.run(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at
java.lang.Thread.run(Unknown Source)
Hub Console -
01:47:49.231 INFO [RequestHandler.process] - Got a request to create a
new session: Capabilities {browserName: firefox, marionette: true,
platform: UNIX, version: } 01:47:49.232 INFO [TestSlot.getNewSession]
- Trying to create a new session on test slot {server:CONFIG_UUID=e18d691a-1d36-4b44-8526-777d4443d078,
seleniumProtocol=WebDriver, marionette=true, browserName=firefox,
maxInstances=5, platformName=LINUX, platform=LINUX}
Node Console -
01:43:34.137 INFO [ActiveSessionFactory.apply] - Capabilities are: {
"browserName": "firefox", "marionette": true, "platform": "UNIX",
"version": "" } 01:43:34.137 INFO
[ActiveSessionFactory.lambda$apply$11] - Matched factory
org.openqa.selenium.grid.session.remote.ServicedSession$Factory
(provider: org.openqa.selenium.firefox.GeckoDriverService)
1542008614143 geckodriver INFO Listening on 127.0.0.1:43589
1542008614199 mozprofile::profile INFO Using profile path
/tmp/rust_mozprofile.bGje3sR6MQxe
1542008614199 geckodriver::marionette INFO Starting browser
/usr/bin/firefox with args
1542008614201 geckodriver::marionette INFO Connecting to Marionette on
localhost:56293 1542008615126 Marionette INFO Listening on port 56293
NPP_GetValue() NPP_GetValue() NPP_GetValue() NPP_GetValue()
I don't understand what is going on here. Please help
selenium selenium-webdriver selenium-grid geckodriver gecko
selenium selenium-webdriver selenium-grid geckodriver gecko
asked Nov 12 at 7:49
Bhabani pattanayak
2416
2416
add a comment |
add a comment |
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53257815%2funable-to-create-new-remote-session-with-remotewebdriver-and-gecko-driver-sessio%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53257815%2funable-to-create-new-remote-session-with-remotewebdriver-and-gecko-driver-sessio%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown