selenium remote出错
来源:互联网 发布:mac版字体下载 编辑:程序博客网 时间:2024/05/22 00:33
今天试了下selenium server,按照书上的教程走,怎么弄都是抛出错误
selenium.common.exceptions.WebDriverException: Message: Error forwarding the new session Empty pool of VM for setup Capabilities [{browserName=chrome, version=, platform=ANY}]
代码是
# -*- coding: utf-8 -*-from selenium.webdriver import Remoteimport time#定义主机list={'http://127.0.0.1:4444/wd/hub':'chrome'}for host,browser in list.items(): print(host,browser) driver=Remote(command_executor=host, desired_capabilities={ "browserName": "chrome", "version": "", "platform": "ANY"} ) driver.get("http://www.baidu.com") driver.find_element_by_id('kw').send_keys(browser) driver.find_element_by_id('su').click() time.sleep(2) driver.close()
找了一圈发现只有Stack overflow上有答案
我就在一个终端上开启hub:
java -jar selenium-server-standalone-2.40.0.jar -role hub
一个开启node,指定下chromedriver的地址:
java -jar selenium-server-standalone-2.40.0.jar -role node -hub http://localhost:4444/wd/hub -browser “browserName=chrome,maxinstance=1,platform=WINDOWS” -Dwebdriver.chrome.driver=F://Anaconda3//envs//tensorflow//chromedriver.exe
然后再运行代码就行了。。。这是怎么搞的?
阅读全文
0 0
- selenium remote出错
- selenium异常:org.openqa.selenium.remote.UnreachableBrowserException
- Selenium Remote Control SSL Support
- selenium core/remote control/IDE
- Selenium 1 (Remote Control)
- selenium Remote Server 实现原理
- perl Selenium::Remote::Driver使用
- Python使用selenium出错
- selenium remote control 实例(java code)
- selenium remote control 实例(java code)
- webdriver selenium org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with
- selenium exceptionin java (org.openqa.selenium.remote.UnreachableBrowserException)
- webdriver selenium org.openqa.selenium.remote.UnreachableBrowserException: Error
- selenium执行火狐浏览器出错
- git remote git push出错的解决办法
- Selenium 自动化测试(二)部署Selenium Remote Control(Selenium RC)
- Exception in thread "main" org.openqa.selenium.remote.SessionNotFoundException
- Exception in thread "main" org.openqa.selenium.remote.SessionNotFoundException
- 查看表的碎片空间并优化表文件
- 手机中sensor 的原理简介
- ubuntu16.0 安装Apache2、mysql、phpmyadmin
- 两点距离
- 工厂方法模式
- selenium remote出错
- [译] Android ExoPlayer Rtmp HLS DASH SmoothStreaming 其他
- Javascript知识点总结(五)
- 使用qml 创建带不重叠线框Table
- 设置R语言默认工作目录
- LintCode181将整数A转换为B
- 1.6 输出保留12位小数的浮点数
- MySQL中char和varchar的区别
- iptables