-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed
Labels
C-pyPython BindingsPython Bindings
Description
🐛 Bug Report
Failed to reuse Remote Webdriver browser, for chrome options and it failed with Exception
To Reproduce
- Start the selenium server
[root@okhatavk Downloads]# java -jar selenium-server-standalone-3.141.59.jar 20:17:44.521 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358 20:17:44.611 INFO [GridLauncherV3.lambda$buildLaunchers$3] - Launching a standalone Selenium Server on port 4444 20:17:44.947 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444
- Run Below Python Code
from selenium import webdriver
options = webdriver.ChromeOptions()
prefs = {'download.prompt_for_download': False}
options.add_experimental_option("prefs", prefs)
options.add_argument('disable-web-security')
options.add_argument("--no-sandbox")
options.add_argument("--disable-dev-shm-usage")
driver_1 = webdriver.Remote(desired_capabilities=options.to_capabilities())
driver_1.get('http://www.google.com')
executor_url = driver_1.command_executor._url
session_id = driver_1.session_id
driver2 = webdriver.Remote(command_executor=executor_url, desired_capabilities={})
driver2.sessions_id = session_id
Exception
WebDriverException: Message: Unable to create session from {
"desiredCapabilities": {
},
"capabilities": {
"firstMatch": [
{
}
]
}
}
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'okhatavk.pnq.csb', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-891.el7.x86_64', java.version: '1.8.0_171'
Driver info: driver.version: unknown
Stacktrace:
at org.openqa.selenium.remote.server.NewSessionPipeline.lambda$null$4 (NewSessionPipeline.java:76)
at java.util.Optional.orElseThrow (Optional.java:290)
at org.openqa.selenium.remote.server.NewSessionPipeline.lambda$createNewSession$5 (NewSessionPipeline.java:75)
at java.util.Optional.orElseGet (Optional.java:267)
at org.openqa.selenium.remote.server.NewSessionPipeline.createNewSession (NewSessionPipeline.java:73)
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 (Executors.java:511)
at java.util.concurrent.FutureTask.run (FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
at java.lang.Thread.run (Thread.java:748)
Expected behaviour
Webdriver driver_1 should be get attached driver_2 without exception
Environment
OS: Linux (Redhat)
Browser: (Chorme)
Browser version: (67)
Browser Driver version:
Language Bindings version: python 3.7
Selenium Grid version (if applicable): Selenium 3.14
Metadata
Metadata
Assignees
Labels
C-pyPython BindingsPython Bindings