bum*_*mbu 5 selenium google-chrome remote-debugging selenium-chromedriver intern
我尝试远程调试Internjs运行的测试.基本上它是由Selenium和Chromedriver运行的Chrome.
我将Chromedriver debuggerAddress选项设置为
debuggerAddress: '127.0.0.1:8765'
Run Code Online (Sandbox Code Playgroud)
现在,当我运行测试时,Selenium会等待一段时间而不是失败并显示消息:
FATAL ERROR
UnknownError: [POST http://localhost:4444/wd/hub/session / {"desiredCapabilities":{"browserName":"chrome","name":"tests/intern_local","idle-timeout":60,"selenium-version":"2.44.0","chromeOptions":{"debuggerAddress":"127.0.0.1:8765"}}}] unknown error: cannot connect to chrome at 127.0.0.1:8765
from chrome not reachable
(Driver info: chromedriver=2.12.301326 (093c7e07b4a916b690e784b0374c7f618f1ea4be),platform=Mac OS X 10.10.1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.64 seconds
Run Code Online (Sandbox Code Playgroud)
我不知道我必须做什么才能将chrome连接到服务器.
我试过了:
./chromedriver_2.11 --port=8765--remote-debugging-port=8765但我没有其他想法如何启动chrome调试服务器.
我尝试过的有用链接对我不起作用:
更新1强制Chromedriver使用带有远程调试的Chrome实例
像在Mozilla文章中一样运行新的Chrome实例
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --no-first-run --no-default-browser-check --user-data-dir=$(mktemp -d -t 'chrome-remote_data_dir')
Run Code Online (Sandbox Code Playgroud)
在实习生集
intern.capabilities = {
'selenium-version': '2.44.0'
, 'chromeOptions': {
debuggerAddress: '127.0.0.1:9222'
}
};
Run Code Online (Sandbox Code Playgroud)
现在,当您运行实习生测试时,实习生将使用您之前打开的Chrome实例.现在您可以打开localhost:9222,您将看到可以调试运行测试的选项卡.然而对我来说,我只能看到远程标签,但点击它什么都不做.
我也试过Firefox WebIDE.我试图连接localhost:9222,它开始加载,一段时间后它说它无法连接.
小智 1
今天晚上我尝试了类似的方法,但没有使用框架。我打开了一个网络驱动程序会话并添加了远程调试器功能。似乎不可能同时运行 webdriver 会话和远程调试。我向谷歌的一些人询问了这一点,但尚未收到答复。
| 归档时间: |
|
| 查看次数: |
1903 次 |
| 最近记录: |