selenium报错
Python 2.7.15
selenium 2.53.6
Firefox 47.0.1
pycharm 2017.3.7
# coding:utf-8
from selenium import webdriver
import time
driver =webdriver.Firefox()
driver.get("https://www.baidu.com")
time.sleep(3)
driver.set_window_size(400, 600)
D:\hyz\install\python\test\venv\Scripts\python.exe D:/hyz/install/python/test/test_project/test01.py
Traceback (most recent call last):
File "D:/hyz/install/python/test/test_project/test01.py", line 7, in <module>
driver.set_window_size(400, 600)
File "D:\hyz\install\python\test\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 1090, in set_window_size
self.set_window_rect(width=int(width), height=int(height))
File "D:\hyz\install\python\test\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 1182, in set_window_rect
"height": height})['value']
File "D:\hyz\install\python\test\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "D:\hyz\install\python\test\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: POST /session/458a0cb1-1d25-445f-9f2f-17b7536a770e/window/rect did not match a known command
Process finished with exit code 1
下载最新的pycharm后没有问题了,2018.3版本
selenium报错的更多相关文章
- 解决centos7下 selenium报错--unknown error: DevToolsActivePort file doesn't exist
解决centos7下 selenium报错--unknown error: DevToolsActivePort file doesn't exist 早上在linux下用selenium启动Chro ...
- selenium报错以及各解决方法
1.driver.findElement(By.name("wd")).sendKeys("selenium"); 报错:The method sendKeys ...
- Selenium报错:StaleElementReferenceException
一个学生在操作页面跳转时遇到一个Selenium报错, 如下图所示: StaleElementReferenceException: Message: stale element reference: ...
- selenium报错汇总
selenium报错汇总 报错:[error] Could not connect to Selenium Server. Have you started the Selenium Server y ...
- ie11 selenium 报错org.openqa.selenium.NoSuchWindowException: Unable to get browser 处理方法
selenium + ie11运行报错 org.openqa.selenium.NoSuchWindowException: Unable to get browser (WARNING: The s ...
- python selenium 报错unknown error: cannot focus element 解决办法
登录框由于js限制,定位到元素后无法sendkey ,sendky报错如下: selenium.common.exceptions.WebDriverException: Message: unkno ...
- python执行selenium报错
python + unittest + HTMLTestRunner 执行suite用例报错 Traceback (most recent call last): File "C:/ws/S ...
- Jenkins执行selenium报错unknown error: cannot find Chrome binary
问题描述:在Pycharm中执行selenium测试用例,可以正常运行, 集成在Jenkins中,构建时,发现构建成功,但是查看Console Output,报错:unknown error: can ...
- windows下使用selenium报错selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH
问题 :执行程序代码报错: WebDriverException:Message:'geckodriver'executable needs to be in Path 或者 selenium.com ...
- windows使用pip安装selenium报错问题
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb9 in position 7: ordinal not in range(128) 这是 ...
随机推荐
- LeetCode——16. 3Sum Closest
一.题目链接:https://leetcode.com/problems/3sum-closest/ 二.题目大意: 给定一个数组A和一个目标值target,要求从数组A中找出3个数来,使得这三个数的 ...
- 陷入了一个NGUI自适应的一个坑
自己对anchor的乱用.造成自己深陷anchor来搞自适应 耽误了太多的精力,最终也是回到正轨的途径 这期间浪费的太多精力了. 沉迷一件错误的事情过久 就 要果断的跳出 调整 . 但凡让自己觉得别扭 ...
- 10分钟复习javaweb
html:是网页的骨架,静态网页初步的轮廓,简单粗糙,僵硬又没有美感.表单的标签<form>,里面的<input>很常用,里面有type属性等css:为了更加灵活,常与div一 ...
- vue之文本渲染
Vue使用了基于HTML的模板语法,允许开发者声明式地将DOM绑定至底层Vue实例的数据.所有Vue的模板都是合法的HTML,所以能被遵循规范的浏览器和HTML解析器解析. 在前面,我们一直使用的是{ ...
- flume-source
1.1 Avro Source 监听Avro端口,从Avro client streams接收events.要求属性是粗体字.利用Avro Source可以实现多级流动.扇出流.扇入流等效果.另外也可 ...
- spring4.0之三:@RestController
spring4.0重要的一个新的改进是@RestController注解,它继承自@Controller注解.4.0之前的版本,Spring MVC的组件都使用@Controller来标识当前类是一个 ...
- Web jsp开发学习——前端后台传参方法
一.前端传后台: 1.1表单数据的传递 前端的表单里定义名字name 后台通过名字获取输入的值 1.2页面点击了哪个按钮传递 登录注销的另一种方式 点击登录的地方设置参数 ...
- jquery中each()的三种遍历用法
1.选择器+遍历 $('div').each(function (i){ i就是索引值 this 表示获取遍历每一个dom对象 }); 2.选择器+遍历 $('div').each(function ...
- 桥接、仅主机和NAT图解
- centos7.0KVM虚拟化
需要在图形化界面完成实验 查看CPU信息 # cat /proc/cpuinfo centos7默认安装的虚拟化包 # yum list open*tools 如果没安装就安装 #yum instal ...