Selenium Grid:使用Windows 8.1 / Firefox

时间:2017-05-11 11:15:15

标签: selenium-webdriver selenium-grid

我有一个简单的Selenium Grid远程驱动程序初始化 因为WebDriverException失败,如下所示:

from selenium import webdriver
from selenium.webdriver.support import expected_conditions as EC

selenium_grid_url='http://localhost:4444/wd/hub'
caps = webdriver.DesiredCapabilities.FIREFOX.copy()
caps['platform']="WINDOWS"
caps['version']="8.1"

remotedriver = webdriver.Remote(desired_capabilities=caps,
                      command_executor=selenium_grid_url)

我收到以下错误:

追踪(最近一次通话):   文件“D:/Selenium/ChromeBrowser/loginscript.py”,第16行,in     command_executor = selenium_grid_url)   文件“D:\ Python \ lib \ site-packages \ selenium \ webdriver \ remote \ webdriver.py”,第98行, init     self.start_session(desired_capabilities,browser_profile)   在start_session中的文件“D:\ Python \ lib \ site-packages \ selenium \ webdriver \ remote \ webdriver.py”,第185行     response = self.execute(Command.NEW_SESSION,参数)   文件“D:\ Python \ lib \ site-packages \ selenium \ webdriver \ remote \ webdriver.py”,第249行,执行     self.error_handler.check_response(响应)   在check_response中输入文件“D:\ Python \ lib \ site-packages \ selenium \ webdriver \ remote \ errorhandler.py”,第194行     提出exception_class(消息,屏幕,堆栈跟踪) selenium.common.exceptions.WebDriverException:消息:无 堆栈跟踪:     at java.util.HashMap.putMapEntries(: - 1)     at java.util.HashMap.putAll(: - 1)     在org.openqa.selenium.remote.DesiredCapabilities。 (DesiredCapabilities.java:55)     在org.openqa.grid.web.servlet.handler.RequestHandler.process(RequestHandler.java:104)     在org.openqa.grid.web.servlet.DriverServlet.process(DriverServlet.java:83)     在org.openqa.grid.web.servlet.DriverServlet.doPost(DriverServlet.java:67)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:707)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:790)     在org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:841)     在org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:543)     在org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)     在org.seleniumhq.jetty9.server.session.SessionHandler.doHandle(SessionHandler.java:1584)     在org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)     在org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1228)     在org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)     在org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:481)     在org.seleniumhq.jetty9.server.session.SessionHandler.doScope(SessionHandler.java:1553)     在org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)     在org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1130)     在org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:141)     在org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)     在org.seleniumhq.jetty9.server.Server.handle(Server.java:564)     在org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:320)     在org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:251)     at org.seleniumhq.jetty9.io.AbstractConnection $ ReadCallback.succeeded(AbstractConnection.java:279)     在org.seleniumhq.jetty9.io.FillInterest.fillable(FillInterest.java:112)     在org.seleniumhq.jetty9.io.ChannelEndPoint $ 2.run(ChannelEndPoint.java:124)     在org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)     在org.seleniumhq.jetty9.util.thread.QueuedThreadPool $ 2.run(QueuedThreadPool.java:590)     在java.lang.Thread.run(: - 1)

使用退出代码1完成处理

我的调用有问题吗?

编辑:

  1. Selenium独立服务器版本:3.4.0

  2. Java版本1.8.0(121)

  3. 网格的集线器和节点都在同一台机器上。

  4. Python版本3.5.2

0 个答案:

没有答案