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报错的更多相关文章

  1. 解决centos7下 selenium报错--unknown error: DevToolsActivePort file doesn't exist

    解决centos7下 selenium报错--unknown error: DevToolsActivePort file doesn't exist 早上在linux下用selenium启动Chro ...

  2. selenium报错以及各解决方法

    1.driver.findElement(By.name("wd")).sendKeys("selenium"); 报错:The method sendKeys ...

  3. Selenium报错:StaleElementReferenceException

    一个学生在操作页面跳转时遇到一个Selenium报错, 如下图所示: StaleElementReferenceException: Message: stale element reference: ...

  4. selenium报错汇总

    selenium报错汇总 报错:[error] Could not connect to Selenium Server. Have you started the Selenium Server y ...

  5. ie11 selenium 报错org.openqa.selenium.NoSuchWindowException: Unable to get browser 处理方法

    selenium + ie11运行报错 org.openqa.selenium.NoSuchWindowException: Unable to get browser (WARNING: The s ...

  6. python selenium 报错unknown error: cannot focus element 解决办法

    登录框由于js限制,定位到元素后无法sendkey ,sendky报错如下: selenium.common.exceptions.WebDriverException: Message: unkno ...

  7. python执行selenium报错

    python + unittest + HTMLTestRunner 执行suite用例报错 Traceback (most recent call last): File "C:/ws/S ...

  8. Jenkins执行selenium报错unknown error: cannot find Chrome binary

    问题描述:在Pycharm中执行selenium测试用例,可以正常运行, 集成在Jenkins中,构建时,发现构建成功,但是查看Console Output,报错:unknown error: can ...

  9. 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 ...

  10. windows使用pip安装selenium报错问题

    UnicodeDecodeError: 'ascii' codec can't decode byte 0xb9 in position 7: ordinal not in range(128) 这是 ...

随机推荐

  1. slot内容分发

    vue实现了一套内容分发的API,这套API基于当前的web components规范草案,将<slot>元素作为承载分发内容的出口. 在前面的父子组件中,我们提到过,在vue中,组件实例 ...

  2. 【转】十年你能做的能得到的有多少?一个工科IT男的工作回忆

    https://blog.csdn.net/b5w2p0/article/details/8798989

  3. 廖雪峰Java2面向对象编程-2数据封装-1方法重载

    方法重载 方法重载Overload是指:多个方法的方法名相同,但各自的参数不同 参数的个数不同 参数的类型不同 参数位置不同 方法返回值类型通常都是相同的 目的:相同功能的方法使用同一名字,便于调用 ...

  4. js读取iframe里的元素

    父层 <div id="SubStepNav" class="SubStepNav"> <iframe src="aaa.html& ...

  5. css属性—position的使用与页面的分层介绍

    一.引言: 在css众多属性中,position算是里面用的比较多也相对来说比较重要的属性了,它对于单个标签的“定位”.标签之间的“相对位置定位”还有网页的分层来说十分重要! 二.“定位的实现”具体介 ...

  6. TextView-- 测量文字宽度

    https://my.oschina.net/lengwei/blog/637380; http://blog.csdn.net/mare_blue/article/details/51388403; ...

  7. [UE4]Size To content自动适配大小

  8. 开始创作自己的VR作品——VR故事叙述终极指南

    转自:http://www.52vr.com/article-1870-1.html       在8月份,YouTube Space LA开展了“VR Creator Lab”的活动,为期三个月.参 ...

  9. Anaconda的基本使用

  10. 文件IO-Linux

    pcb:结构体 一个进程由一个文件描述符表:1024,前三个占用,文件描述符作用,需要磁盘文件. 1:open.close int open(const char* pathname,int flag ...