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. 基于无锁队列和c++11的高性能线程池

    基于无锁队列和c++11的高性能线程池线程使用c++11库和线程池之间的消息通讯使用一个简单的无锁消息队列适用于linux平台,gcc 4.6以上   标签: <无>   代码片段(6)[ ...

  2. dfs常见的配置文件中的value与description(重要)

    不多说,直接上干货! name value description dfs.namenode.logging.level info The logging level for dfs namenode ...

  3. P1706 全排列问题

    题解:(其实我认为它就是个循环) #include<iostream> #include<cstdio> #include<iomanip> using names ...

  4. [UE4]AIPerception,AI感知

  5. 996ICU的感悟

     并不只是口头上的支持,吉多·范罗苏姆近日又在 Python 官方论坛发布一篇名为<Can we do something for 996 programmers in China?>(我 ...

  6. Mybatis 系列1-环境搭建

    [Mybatis 系列10-结合源码解析mybatis 执行流程] [Mybatis 系列9-强大的动态sql 语句] [Mybatis 系列8-结合源码解析select.resultMap的用法] ...

  7. PyCharm的模板设置

    在File—settings—Editor—File and Code Templates—Python script 脚本里添加 编辑内容 (a)shebang行 #!/usr/bin/python ...

  8. IDEA配置打可运行jar包

    IDEA打包可以运行的jar包大体有两种方式:一种是比较方便的配置maven:一种是直接配置IDEA采用Build Artifacts打包. 配置maven打包,在pom.xml里面配置build插件 ...

  9. MyBatis配置Mapping,JavaType和JDBCType的对应关系,#与$区别

    Mybatis中javaType和jdbcType对应关系:JDBC Type Java TypeCHAR StringVARCHAR StringLONGVARCHAR  StringNUMERIC ...

  10. struts Action设置数据的方法

    一.属性驱动 注:示例中的实体类没有相应展示出来 1.基本数据类型的属性 基本数据类型的属性指每一个前台提交的属性在后台对应的Action类中都有相应的属性与之相对应 例如:前台表单: <for ...