- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我使用nodejs selenium-standalone,我有:
1)在Mac上以角色=集线器运行的 Selenium 独立服务器
2)在带有role = node的Mac上独立运行的 Selenium (用于在本地Mac浏览器上运行测试)
3)Windows 10安装在并行台式机上, Selenium 独立运行,角色=节点
4)关于本文配置IE11 https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver#required-configuration
我的测试(yandex gemini)中有gridUrl配置,当我将其设置为Windows节点url(http://10.211.55.4:5555/wd/hub)时,IE11测试工作正常。但是,当我将gridUrl设置为正确的值(表示本地网格集线器127.0.0.1:4444/wd/hub)时,IE11打开时停留在“这是WebDriver服务器的初始起始页”。和控制台中的“仅允许本地连接”。在这种情况下,所有其他Windows浏览器都可以正常工作(chrome,firefox,edge)。在mac selenium网格中心控制台或Windows selenium节点控制台中没有任何错误-似乎是网格中心以某种方式错误地尝试调用Windows节点IEDriver。
启动 Selenium 的命令:
1)MacOS集线器:
java -jar 3.8.1-server.jar -role hub
java -jar 3.8.1-server.jar -role node -hub http://192.168.1.4:4444/grid/register
2018-01-21 22:07:43.348:INFO:osjshC.ROOT:qtp31280858-9: org.openqa.selenium.remote.server.WebDriverServlet-11d44a3: Initialising WebDriverServlet
22:07:43.379 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession@1f51925
22:07:43.379 INFO - /session: Executing POST on /session (handler: BeginSession)
22:07:43.458 INFO - Capabilities are: Capabilities {browserName: internet explorer, javascriptEnabled: true, platform: WINDOWS, version: }
22:07:43.458 INFO - Capabilities {browserName: internet explorer, javascriptEnabled: true, platform: WINDOWS, version: } matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.ie.InternetExplorerDriverService)
Started InternetExplorerDriver server (64-bit)
3.8.0.0
Listening on port 3512
Only local connections are allowed
22:07:43.770 DEBUG - CookieSpec selected: default
22:07:43.770 DEBUG - Auth cache not set in the context
22:07:45.551 INFO - Detected dialect: W3C
22:07:45.598 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:45.598 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/window/current/size (handler: ServicedSession)
22:07:45.770 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:45.770 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/execute (handler: ServicedSession)
22:07:45.833 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:45.833 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/moveto (handler: ServicedSession)
22:07:45.865 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:45.865 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/url (handler: ServicedSession)
22:07:46.428 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:46.428 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/execute (handler: ServicedSession)
22:07:46.489 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:46.489 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/execute (handler: ServicedSession)
22:07:46.552 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:46.552 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/execute (handler: ServicedSession)
22:07:46.615 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:46.615 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/execute (handler: ServicedSession)
22:07:47.208 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:47.208 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing GET on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/screenshot (handler: ServicedSession)
22:07:47.301 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:47.301 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/execute (handler: ServicedSession)
22:07:47.349 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:47.349 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing GET on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/screenshot (handler: ServicedSession)
22:07:47.520 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:47.520 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/execute (handler: ServicedSession)
22:07:47.599 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:47.599 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing GET on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/screenshot (handler: ServicedSession)
22:07:47.771 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:47.786 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing POST on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/execute (handler: ServicedSession)
22:07:47.833 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:47.833 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing GET on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f/screenshot (handler: ServicedSession)
22:07:48.567 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@c91496
22:07:48.567 INFO - Handler thread for session 7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (internet explorer): Executing DELETE on /session/7bfb0881-fcfb-48fc-8f6a-cdbdf7164a6f (handler: ServicedSession)
22:07:48.598 INFO - Removing session org.openqa.selenium.remote.server.ServicedSession@c91496
2018-01-21 22:14:36.612:INFO:osjshC.ROOT:qtp29933260-14: org.openqa.selenium.remote.server.WebDriverServlet-1474f18: Initialising WebDriverServlet
22:14:36.628 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession@1f793e6
22:14:36.628 INFO - /session: Executing POST on /session (handler: BeginSession)
22:14:36.721 INFO - Capabilities are: Capabilities {browserName: internet explorer, javascriptEnabled: true, platform: WINDOWS, version: }
22:14:36.721 INFO - Capabilities {browserName: internet explorer, javascriptEnabled: true, platform: WINDOWS, version: } matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.ie.InternetExplorerDriverService)
22:14:36.752 DEBUG - Waiting for [http://localhost:15388/status]
22:14:36.752 DEBUG - Polling http://localhost:15388/status
Started InternetExplorerDriver server (64-bit)
3.8.0.0
Listening on port 15388
Only local connections are allowed
22:14:37.269 DEBUG - Polling http://localhost:15388/status
22:14:37.269 DEBUG - sun.net.www.MessageHeader@14906bf5 pairs: {GET /status HTTP/1.1: null}{User-Agent: Java/1.8.0_161}{Host: localhost:15388}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}
22:14:37.269 DEBUG - sun.net.www.MessageHeader@4b81f27 pairs: {null: HTTP/1.1 200 OK}{Content-Length: 185}{Content-Type: application/json; charset=UTF-8}{Cache-Control: no-cache}{Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept}{Accept-Ranges: bytes}{Connection: close}
22:14:37.283 DEBUG - CookieSpec selected: default
22:14:37.283 DEBUG - Auth cache not set in the context
22:14:37.283 DEBUG - Connection request: [route: {}->http://localhost:15388][total kept alive: 0; route allocated: 0 of 2000; total allocated: 0 of 2000]
22:14:37.283 DEBUG - Connection leased: [id: 2][route: {}->http://localhost:15388][total kept alive: 0; route allocated: 1 of 2000; total allocated: 1 of 2000]
22:14:37.283 DEBUG - Opening connection {}->http://localhost:15388
22:14:37.283 DEBUG - Connecting to localhost/127.0.0.1:15388
22:14:37.283 DEBUG - Connection established 127.0.0.1:52058<->127.0.0.1:15388
22:14:37.283 DEBUG - http-outgoing-2: set socket timeout to 10800000
22:14:37.283 DEBUG - Executing request POST /session HTTP/1.1
22:14:37.283 DEBUG - Target auth state: UNCHALLENGED
22:14:37.283 DEBUG - Proxy auth state: UNCHALLENGED
22:14:37.283 DEBUG - http-outgoing-2 >> POST /session HTTP/1.1
22:14:37.283 DEBUG - http-outgoing-2 >> Content-Type: application/json; charset=utf-8
22:14:37.283 DEBUG - http-outgoing-2 >> Content-Length: 364
22:14:37.283 DEBUG - http-outgoing-2 >> Host: localhost:15388
22:14:37.283 DEBUG - http-outgoing-2 >> Connection: Keep-Alive
22:14:37.283 DEBUG - http-outgoing-2 >> User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_161)
22:14:37.283 DEBUG - http-outgoing-2 >> Accept-Encoding: gzip,deflate
22:14:37.283 DEBUG - http-outgoing-2 >> "POST /session HTTP/1.1[\r][\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> "Content-Type: application/json; charset=utf-8[\r][\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> "Content-Length: 364[\r][\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> "Host: localhost:15388[\r][\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> "Connection: Keep-Alive[\r][\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> "User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_161)[\r][\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> "Accept-Encoding: gzip,deflate[\r][\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> "[\r][\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> "{[\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> " "desiredCapabilities": {"browserName":"internet explorer","javascriptEnabled":true,"platform":"WINDOWS","version":""},[\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> " "capabilities": {[\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> " "desiredCapabilities": {"browserName":"internet explorer","javascriptEnabled":true,"platform":"WINDOWS","version":""},[\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> " "firstMatch": [[\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> " {"browserName":"internet explorer","platformName":"windows"}[\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> " ][\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> " }[\n]"
22:14:37.283 DEBUG - http-outgoing-2 >> "}"
22:14:38.833 DEBUG - http-outgoing-2 << "HTTP/1.1 200 OK[\r][\n]"
22:14:38.833 DEBUG - http-outgoing-2 << "Content-Length: 692[\r][\n]"
22:14:38.833 DEBUG - http-outgoing-2 << "Content-Type: application/json; charset=UTF-8[\r][\n]"
22:14:38.833 DEBUG - http-outgoing-2 << "Cache-Control: no-cache[\r][\n]"
22:14:38.833 DEBUG - http-outgoing-2 << "Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept[\r][\n]"
22:14:38.833 DEBUG - http-outgoing-2 << "Accept-Ranges: bytes[\r][\n]"
22:14:38.833 DEBUG - http-outgoing-2 << "Connection: close[\r][\n]"
22:14:38.833 DEBUG - http-outgoing-2 << "[\r][\n]"
22:14:38.833 DEBUG - http-outgoing-2 << "{"value":{"capabilities":{"acceptInsecureCerts":false,"browserName":"internet explorer","browserVersion":"11","pageLoadStrategy":"normal","platformName":"windows","proxy":{},"se:ieOptions":{"browserAttachTimeout":0,"elementScrollBehavior":0,"enablePersistentHover":true,"ie.browserCommandLineSwitches":"","ie.ensureCleanSession":false,"ie.fileUploadDialogTimeout":3000,"ie.forceCreateProcessApi":false,"ignoreProtectedModeSettings":false,"ignoreZoomSetting":false,"initialBrowserUrl":"http://localhost:15388/","nativeEvents":true,"requireWindowFocus":false},"setWindowRect":true,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000}},"sessionId":"3aba8a66-2b37-4516-b16c-b34acaea1555"}}[\n]"
22:14:38.833 DEBUG - http-outgoing-2 << "[\r][\n]"
22:14:38.833 DEBUG - http-outgoing-2 << HTTP/1.1 200 OK
22:14:38.833 DEBUG - http-outgoing-2 << Content-Length: 692
22:14:38.833 DEBUG - http-outgoing-2 << Content-Type: application/json; charset=UTF-8
22:14:38.833 DEBUG - http-outgoing-2 << Cache-Control: no-cache
22:14:38.833 DEBUG - http-outgoing-2 << Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
22:14:38.833 DEBUG - http-outgoing-2 << Accept-Ranges: bytes
22:14:38.833 DEBUG - http-outgoing-2 << Connection: close
22:14:38.833 DEBUG - http-outgoing-2: Close connection
22:14:38.833 DEBUG - Connection discarded
22:14:38.833 DEBUG - Connection released: [id: 2][route: {}->http://localhost:15388][total kept alive: 0; route allocated: 0 of 2000; total allocated: 0 of 2000]
22:14:38.848 INFO - Detected dialect: W3C
22:14:38.864 DEBUG - Executing: newSession [null, newSession {desiredCapabilities=Capabilities {acceptInsecureCerts: false, browserName: internet explorer, browserVersion: 11, pageLoadStrategy: normal, platformName: windows, proxy: Proxy(), se:ieOptions: {browserAttachTimeout: 0, elementScrollBehavior: 0, enablePersistentHover: true, ie.browserCommandLineSwitches: , ie.ensureCleanSession: false, ie.fileUploadDialogTimeout: 3000, ie.forceCreateProcessApi: false, ignoreProtectedModeSettings: false, ignoreZoomSetting: false, initialBrowserUrl: http://localhost:15388/, nativeEvents: true, requireWindowFocus: false}, setWindowRect: true, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}}}]
22:14:38.864 DEBUG - Executed: [null, newSession {desiredCapabilities=Capabilities {acceptInsecureCerts: false, browserName: internet explorer, browserVersion: 11, pageLoadStrategy: normal, platformName: windows, proxy: Proxy(), se:ieOptions: {browserAttachTimeout: 0, elementScrollBehavior: 0, enablePersistentHover: true, ie.browserCommandLineSwitches: , ie.ensureCleanSession: false, ie.fileUploadDialogTimeout: 3000, ie.forceCreateProcessApi: false, ignoreProtectedModeSettings: false, ignoreZoomSetting: false, initialBrowserUrl: http://localhost:15388/, nativeEvents: true, requireWindowFocus: false}, setWindowRect: true, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}}}]
22:14:40.676 DEBUG - CookieSpec selected: default
22:14:40.676 DEBUG - Auth cache not set in the context
最佳答案
我可以清楚地看到 Selenium Grid Hub
配置中存在一些不匹配,并且 Selenium Grid Node
注册到 Selenium Grid Hub
的过程如下:
Selenium Grid Hub
日志说:Nodes should register to http://10.37.129.2:4444/grid/register/
Selenium Grid Node
日志说:Registering the node to the hub: http://192.168.1.4:4444/grid/register
IEDriverServer
和
Internet Explorer
时,但您使用的默认命令为:
java -jar 3.8.1-server.jar -role node -hub http://192.168.1.4:4444/grid/register
INFO - Detected dialect: W3C
的确切原因,如下所示:
Started InternetExplorerDriver server (64-bit)
3.8.0.0
Listening on port 15388
Only local connections are allowed
22:14:37.269 DEBUG - Polling http://localhost:15388/status
22:14:37.269 DEBUG - sun.net.www.MessageHeader@14906bf5 pairs: {GET /status HTTP/1.1: null}{User-Agent: Java/1.8.0_161}{Host: localhost:15388}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}
22:14:37.269 DEBUG - sun.net.www.MessageHeader@4b81f27 pairs: {null: HTTP/1.1 200 OK}{Content-Length: 185}{Content-Type: application/json; charset=UTF-8}{Cache-Control: no-cache}{Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept}{Accept-Ranges: bytes}{Connection: close}
22:14:37.283 DEBUG - CookieSpec selected: default
22:14:37.283 DEBUG - Auth cache not set in the context
WebDriver
变体中,您打算如下使用:
java -Dwebdriver.ie.driver=IEDriverServer.exe -jar selenium-server-standalone-3.8.1.jar -role node -hub http://192.168.1.50:4444/grid/register
Started InternetExplorerDriver server (64-bit)
3.7.0.0
Listening on port 18597
Only local connections are allowed
20:31:59.237 INFO - Detected dialect: W3C
20:31:59.592 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@40024bf3
20:31:59.593 INFO - Handler thread for session b020db2b-f3db-43f6-a3db-7a21b8c440f7 (internet explorer): Executing POST on /session/b020db2b-f3db-43f6-a3db-7a21b8c440f7/url (handler: ServicedSession)
20:31:59.663 INFO - To upstream: {"url":"http://google.com/"}
The server (grid node) needs to be started with the system property -- not the client i.e. you need to point the node to the geckodriver installation on the node
Selenium Grid Hub
和
Selenium Grid Node
:
Selenium Grid Hub
:java -jar selenium-server-standalone-3.8.1.jar -role hub
19:40:59.322 INFO - Selenium build info: version: '3.8.1', revision: '6e95a6684b'
19:40:59.324 INFO - Launching Selenium Grid hub
2018-01-23 19:41:01.710:INFO::main: Logging initialized @2960ms to org.seleniumhq.jetty9.util.log.StdErrLog
19:41:01.764 INFO - Will listen on 4444
2018-01-23 19:41:01.881:INFO:osjs.Server:main: jetty-9.4.7.v20170914
2018-01-23 19:41:01.923:INFO:osjs.session:main: DefaultSessionIdManager workerName=node0
2018-01-23 19:41:01.924:INFO:osjs.session:main: No SessionScavenger set, using defaults
2018-01-23 19:41:01.928:INFO:osjs.session:main: Scavenging every 600000ms
2018-01-23 19:41:01.937:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@1b68b9a4{/,null,AVAILABLE}
2018-01-23 19:41:01.959:INFO:osjs.AbstractConnector:main: Started ServerConnecto
r@157632c9{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
2018-01-23 19:41:01.960:INFO:osjs.Server:main: Started @3211ms
19:41:01.960 INFO - Nodes should register to http://192.168.1.50:4444/grid/register/
19:41:01.961 INFO - Selenium Grid hub is up and running
Selenium Grid Hub URI
是:http://192.168.1.50:4444 Selenium Grid Hub Console
打开 URL
:http://192.168.1.50:4444/grid/console
Selenium Grid Hub Config 1
:Selenium Grid Hub Config 2
:Selenium Grid Node
的 IE11
:java -Dwebdriver.ie.driver=IEDriverServer.exe -jar selenium-server-standalone-3.8.1.jar -role node -hub http://192.168.1.50:4444/grid/register
Selenium Grid Node
已在http://192.168.1.50:4444/grid/register Selenium Grid Node
CLI上生成以下日志:19:46:22.516 INFO - Selenium build info: version: '3.8.1', revision: '6e95a6684b'
19:46:22.517 INFO - Launching a Selenium Grid node
2018-01-23 19:46:25.124:INFO::main: Logging initialized @4715ms to org.seleniumhq.jetty9.util.log.StdErrLog
19:46:25.178 INFO - Using `new FirefoxOptions()` is preferred to `DesiredCapabilities.firefox()`
19:46:25.221 INFO - Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
19:46:25.226 INFO - Using `new EdgeOptions()` is preferred to `DesiredCapabilities.edge()`
19:46:25.227 INFO - Driver class not found: com.opera.core.systems.OperaDriver
19:46:25.228 INFO - Using `new OperaOptions()` is preferred to `DesiredCapabilities.operaBlink()`
19:46:25.230 INFO - Using `new SafariOptions()` is preferred to `DesiredCapabilities.safari()`
19:46:25.232 INFO - Driver class not found: org.openqa.selenium.phantomjs.PhantomJSDriver
19:46:25.306 INFO - Driver provider class org.openqa.selenium.safari.SafariDriver registration is skipped:
registration capabilities Capabilities {browserName: safari, platform: MAC, version: } does not match the current platform WIN8
19:46:25.371 INFO - Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
19:46:25.373 INFO - Using `new EdgeOptions()` is preferred to `DesiredCapabilities.edge()`
19:46:25.374 INFO - Using `new FirefoxOptions()` is preferred to `DesiredCapabilities.firefox()`
19:46:25.375 INFO - Using `new OperaOptions()` is preferred to `DesiredCapabilities.operaBlink()`
19:46:25.376 INFO - Using `new SafariOptions()` is preferred to `DesiredCapabilities.safari()`
19:46:25.391 INFO - Using the passthrough mode handler
2018-01-23 19:46:25.429:INFO:osjs.Server:main: jetty-9.4.7.v20170914
2018-01-23 19:46:25.472:WARN:osjs.SecurityHandler:main: ServletContext@o.s.j.s.S
ervletContextHandler@38afe297{/,null,STARTING} has uncovered http methods for path: /
2018-01-23 19:46:25.481:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@38afe297{/,null,AVAILABLE}
2018-01-23 19:46:25.503:INFO:osjs.AbstractConnector:main: Started ServerConnector@12bb9576{HTTP/1.1,[http/1.1]}{0.0.0.0:5555}
2018-01-23 19:46:25.504:INFO:osjs.Server:main: Started @5097ms
19:46:25.506 INFO - Selenium Grid node is up and ready to register to the hub
19:46:25.555 INFO - Starting auto registration thread. Will try to register every 5000 ms.
19:46:25.556 INFO - Registering the node to the hub: http://192.168.1.50:4444/grid/register
19:46:25.802 INFO - The node is registered to the hub and ready to use
Selenium Grid Hub
CLI上生成以下日志:20:59:54.695 INFO - Registered a node http://192.168.1.50:5555
Selenium Grid Hub Console
:Selenium Grid Node
执行:public class test_IE_Grid
{
@Test
public void test1() throws MalformedURLException
{
System.setProperty("webdriver.ie.driver", "C:\\Utility\\BrowserDrivers\\IEDriverServer.exe");
DesiredCapabilities cap = DesiredCapabilities.internetExplorer();
URL url = new URL("http://192.168.1.50:4444/wd/hub");
WebDriver driver = new RemoteWebDriver(url, cap);
driver.get("http://google.com/");
System.out.println("Title is : "+driver.getTitle());
driver.quit();
}
}
Selenium Grid Node
CLI上观察以下日志:2018-01-23 20:31:49.931:INFO:osjshC.ROOT:qtp1582071873-15: org.openqa.selenium.remote.server.WebDriverServlet-34123d65: Initialising WebDriverServlet
20:31:49.976 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession@5769309d
20:31:49.990 INFO - /session: Executing POST on /session (handler: BeginSession)
20:31:50.085 INFO - Capabilities are: Capabilities {browserName: internet explorer, ensureCleanSession: true, platform: WINDOWS, version: }
20:31:50.089 INFO - Capabilities {browserName: internet explorer, ensureCleanSession: true, platform: WINDOWS, version: } matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.ie.InternetExplorerDriverService)
Started InternetExplorerDriver server (64-bit)
3.7.0.0
Listening on port 18597
Only local connections are allowed
20:31:59.237 INFO - Detected dialect: W3C
20:31:59.592 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@40024bf3
20:31:59.593 INFO - Handler thread for session b020db2b-f3db-43f6-a3db-7a21b8c440f7 (internet explorer): Executing POST on /session/b020db2b-f3db-43f6-a3db-7a21b8c440f7/url (handler: ServicedSession)
20:31:59.663 INFO - To upstream: {"url":"http://google.com/"}
20:32:11.793 INFO - To downstream: {"value":null}
20:32:11.821 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@40024bf3
20:32:11.823 INFO - Handler thread for session b020db2b-f3db-43f6-a3db-7a21b8c440f7 (internet explorer): Executing GET on /session/b020db2b-f3db-43f6-a3db-7a21b8c440f7/title (handler: ServicedSession)
20:32:11.844 INFO - To downstream: {"value":"Google"}
20:32:11.856 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@40024bf3
20:32:11.857 INFO - Handler thread for session b020db2b-f3db-43f6-a3db-7a21b8c440f7 (internet explorer): Executing DELETE on /session/b020db2b-f3db-43f6-a3db-7a21b8c440f7 (handler: ServicedSession)
20:32:11.870 INFO - To downstream: {"value":null}
20:32:11.883 INFO - Removing session org.openqa.selenium.remote.server.ServicedSession@40024bf3
20:32:11.890 INFO - To downstream: { "value" : null }
Selenium Grid Hub
CLI上观察以下日志:20:31:49.855 INFO - Got a request to create a new session: Capabilities {browserName: internet explorer, ensureCleanSession: true, platform: WINDOWS, version: }
20:31:49.866 INFO - Trying to create a new session on test slot {seleniumProtocol=WebDriver, se:CONFIG_UUID=dd5107be-46cc-4411-816e-e51177b854c6, browserName=internet explorer, maxInstances=1, platform=WINDOWS}
Jan 23, 2018 9:18:34 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Title is : Google
PASSED: test1
===============================================
Default test
Tests run: 1, Failures: 0, Skips: 0
===============================================
===============================================
Default suite
Total tests run: 1, Failures: 0, Skips: 0
===============================================
关于selenium - 如果指定了直接节点ip,则IE11测试将运行,但如果指定了网格集线器url,则IE11测试将失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48366040/
我将 Bootstrap 与 css 和 java 脚本结合使用。在不影响前端代码的情况下,我真的很难在css中绘制这个背景。在许多问题中,人们将宽度和高度设置为 0%。但是由于我的导航栏,我不能使用
我正在用 c 编写一个程序来读取文件的内容。代码如下: #include void main() { char line[90]; while(scanf("%79[^\
我想使用 javascript 获取矩阵数组的所有对 Angular 线。假设输入输出如下: input = [ [1,2,3], [4,5,6], [7,8,9], ] output =
可以用pdfmake绘制lines,circles和other shapes吗?如果是,是否有documentation或样本?我想用jsPDF替换pdfmake。 最佳答案 是的,有可能。 pdfm
我有一个小svg小部件,其目的是显示角度列表(参见图片)。 现在,角度是线元素,仅具有笔触,没有填充。但是现在我想使用一种“内部填充”颜色和一种“笔触/边框”颜色。我猜想line元素不能解决这个问题,
我正在为带有三角对象的 3D 场景编写一个非常基本的光线转换器,一切都工作正常,直到我决定尝试从场景原点 (0/0/0) 以外的点转换光线。 但是,当我将光线原点更改为 (0/1/0) 时,相交测试突
这个问题已经有答案了: Why do people write "#!/usr/bin/env python" on the first line of a Python script? (22 个回
如何使用大约 50 个星号 * 并使用 for 循环绘制一条水平线?当我尝试这样做时,结果是垂直(而不是水平)列出 50 个星号。 public void drawAstline() { f
这是一个让球以对角线方式下降的 UI,但球保持静止;线程似乎无法正常工作。你能告诉我如何让球移动吗? 请下载一个球并更改目录,以便程序可以找到您的球的分配位置。没有必要下载足球场,但如果您愿意,也可以
我在我的一个项目中使用 Jmeter 和 Ant,当我们生成报告时,它会在报告中显示 URL、#Samples、失败、成功率、平均时间、最短时间、最长时间。 我也想在报告中包含 90% 的时间线。 现
我有一个不寻常的问题,希望有人能帮助我。我想用 Canvas (android) 画一条 Swing 或波浪线,但我不知道该怎么做。它将成为蝌蚪的尾部,所以理想情况下我希望它的形状更像三角形,一端更大
这个问题已经有答案了: Checking Collision of Shapes with JavaFX (1 个回答) 已关闭 8 年前。 我正在使用 JavaFx 8 库。 我的任务很简单:我想检
如何按编号的百分比拆分文件。行数? 假设我想将我的文件分成 3 个部分(60%/20%/20% 部分),我可以手动执行此操作,-_-: $ wc -l brown.txt 57339 brown.tx
我正在努力实现这样的目标: 但这就是我设法做到的。 你能帮我实现预期的结果吗? 更新: 如果我删除 bootstrap.css 依赖项,问题就会消失。我怎样才能让它与 Bootstrap 一起工作?
我目前正在构建一个网站,但遇到了 transform: scale 的问题。我有一个按钮,当用户将鼠标悬停在它上面时,会发生两件事: 背景以对 Angular 线“扫过” 按钮标签颜色改变 按钮稍微变
我需要使用直线和仿射变换绘制大量数据点的图形(缩放图形以适合 View )。 目前,我正在使用 NSBezierPath,但我认为它效率很低(因为点在绘制之前被复制到贝塞尔路径)。通过将我的数据切割成
我正在使用基于 SVM 分类的 HOG 特征检测器。我可以成功提取车牌,但提取的车牌除了车牌号外还有一些不必要的像素/线。我的图像处理流程如下: 在灰度图像上应用 HOG 检测器 裁剪检测到的区域 调
我有以下图片: 我想填充它的轮廓(即我想在这张图片中填充线条)。 我尝试了形态学闭合,但使用大小为 3x3 的矩形内核和 10 迭代并没有填满整个边界。我还尝试了一个 21x21 内核和 1 迭代,但
我必须找到一种算法,可以找到两组数组之间的交集总数,而其中一个数组已排序。 举个例子,我们有这两个数组,我们向相应的数字画直线。 这两个数组为我们提供了总共 7 个交集。 有什么样的算法可以帮助我解决
简单地说 - 我想使用透视投影从近裁剪平面绘制一条射线/线到远裁剪平面。我有我认为是使用各种 OpenGL/图形编程指南中描述的方法通过单击鼠标生成的正确标准化的世界坐标。 我遇到的问题是我的光线似乎
我是一名优秀的程序员,十分优秀!