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. 透过CAT,来看分布式实时监控系统的设计与实现

    2011年底,我加入大众点评网,出于很偶然的机会,决定开发CAT,为各个业务线打造分布式实时监控系统,CAT的核心概念源自eBay闭源系统CAL----eBay的几大法宝之一. 在当今互联网时代,业务 ...

  2. HDOJ 2007 平方和与立方和

    #include<iostream> #include<algorithm> using namespace std; int main() { int m, n; while ...

  3. HDOJ 2003 求绝对值

    #include<cstdio> #include<cmath> int main() { double a; while (scanf_s("%lf", ...

  4. []map[][]切片map小计

    go中的map我们都知道在进行遍历的时候我们知道他是无序的.对于map[int]interface{}类型的,我们可以通过计算map的长度,通过定长的for循环,进行顺序的输出. 那么如果map的类型 ...

  5. HTTP 2.0 原理详细分析

    HTTP 2.0是在SPDY(An experimental protocol for a faster web, The Chromium Projects)基础上形成的下一代互联网通信协议.HTT ...

  6. APP中https证书有效性验证引发安全问题(例Fiddler可抓https包)

    原文: https://blog.csdn.net/woddle/article/details/71175140 在实际项目代码审计中发现,目前很多手机银行虽然使用了https通信方式,但是只是简单 ...

  7. Jmeter(十)检查点

    检查点又名断言,我们在手工测试过程中肉眼以及自己的逻辑思维对实际结果进行判断是否与预期结果一致,但是工具是死的,没有眼睛,没有思维,并不知道需要判断的信息在哪块,或者是来判断什么东西,我们需要让工具更 ...

  8. golang "text/template" 模板语法简明教程

    转自:https://www.cnblogs.com/Pynix/p/4154630.html [模板标签] 模板标签用"{{"和"}}"括起来   [注释] ...

  9. Mysql 之闪回技术 binlog2sql

    1.下载 https://github.com/danfengcao/binlog2sql http://rpmfind.net Search: python-pip pip 是一个Python包管理 ...

  10. MySQL的用户密码过期功能

    Payment Card Industry,即支付卡行业,PCI行业表示借记卡.信用卡.预付卡.电子钱包.ATM和POS卡及相关的业务. PCI DSS,即PCI数据安全标准(Payment Card ...