理论上我发的每个短文,直接复制放到py里面,python xx.py是可以执行的,不过因为版本,编码什么的问题会有报错,详见这里 报错: SyntaxError: Non-ASCII character '\xd4' in file xxx.py on line 1, but no encoding declared; 解决:在py文件首行加 # coding: UTF-8 如果是linux系统,最好再加上 #!/usr/bin/python 告诉python在哪里 报错:Indentation…
初次用IE浏览器运行自动化程序时,报错:selenium.common.exceptions.WebDriverException: Message: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled…
raise exception_class(message, screen, stacktrace)selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities selenium3.0之后的版本的就不支持直接打开火狐浏览器,启动火狐浏览器报错,如下图,要想运行就需要我们单独装上驱动. 3.0之前的版本,是可以直接打开火狐浏览器的.火狐版本不…
问题:Chrome浏览器报错:Origin null is not allowed by Access-Control-Allow-Origin. 原因:.js文件中使用load()方法,而Chrome浏览器出于安全起见,不允许load本地文件. 方法:给Chrome添加启动参数--allow-file-access-from-files. 步骤:右击Chrome浏览器快捷方式,选择“属性”,在“目标”中加上"--allow-file-access-from-files",注意前面有个…