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. googletest--Test Fixture

    前面博客中我们在单元测试之前会做一些变量初始化等工作,而同一个testcase的不同test之间往往会有一些初始化工作是相同的.我们不想做多余的重复的工作,当然同时也不想设置全局变量. 这个时候我们可 ...

  2. 1.Linux命令

    所有文章都只做学习记录用! 一.Linux开发板操作命令 1.查看命令:  系统相关:           **任务管理器: gnome-system-monitor 查看系统版 :uname -a ...

  3. 【转】SOA架构设计经验分享—架构、职责、数据一致性

      1.背景介绍       最近一段时间都在做系统分析和设计工作,面对的业务是典型的重量级企业应用方向.突然发现很多以往觉得很简单的问题变得没有想象的那么容易,最大的问题就 是职责如何分配.论系统架 ...

  4. vue之v-if和v-show

    v-if v-if主要用来进行条件渲染. <!DOCTYPE html> <html lang="en"> <head> <meta ch ...

  5. Flink安装启动

    1.下载安装包并解压 下载网址:https://flink.apache.org/ 版本选择可以根据安装的hadoop版本和Scala版本进行选择 我用的是:flink-1.3.3-bin-hadoo ...

  6. [转][html]设置IIS 默认页

    <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.we ...

  7. 让可等待的计时器添加APC调用

    // TimerAPCRoutine.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" #include <windows.h> ...

  8. [UE4]end快捷键,落地

    actor的根节点需要是实体模型才可以,end快捷键着地是让actor的根节点着地.

  9. PHP正则配合写配置文件导致Getshell

    PHP正则配合写配置文件导致Getshell,偶然间看到的一个题目, p 牛的小密圈的一个问题. 分析一下,漏洞代码: index.php <?php $str=addslashes($_GET ...

  10. 00001 - Linux 上的 Shebang 符号(#!)

    使用Linux或者unix系统的同学可能都对#!这个符号并不陌生,但是你真的了解它吗? 本文了将给你简单介绍一下Shebang(”#!”)这个符号. 首先,这个符号(#!)的名称,叫做”Shebang ...