随笔分类 - Python
摘要:一.现象还原: 当新建.py文件时,需要引用selenium中的方法时,报错,提示红波浪线: Unresolved reference 'selenium' less... (Ctrl+F1) This inspection detects names that should resolve but
阅读全文
摘要:如上图,输入一个单词时会出现波浪线,报:Spellchecker inspection helps locate typos and misspelling in your code, comments and literals, and fix them in one click. 翻译:拼写检查
阅读全文
摘要:感谢: 煜妃的《Python+Selenium定位不到元素常见原因及解决办法(报:NoSuchElementException)》 ClassName定位报错问题:《【Python】Selenium元素定位错误之解决办法》
阅读全文
摘要:阐述问题: 执行自动化脚本时,发现文本输入在IE浏览器上特别慢,这样大大降低了自动化效率 解决办法:原因是原先下载的IEDriverServer.exe为64位系统的IE,换为32位的IEDriverServer.exe就可以了,下载地址为:IEDriverServer_Win32_2.52.0.z
阅读全文
摘要:总结: 感谢: “煜妃”《Selenuim+Python之元素定位总结及实例说明》 “Huilaojia123”《selenium WebDriver定位元素学习总结》 “上海-悠悠”《Selenium2+python自动化9-CSS定位语法》 的文章
阅读全文
摘要:一、常见异常 我们通过 open()方法以读“r”的方式打开一个 abc.txt 的文件。然后 Python 抛出一个FileNotFoundError 类型的异常,它告诉我们:No such file or directory:“abc.txt”(没有abc.txt 这样的文件或目录)。当然找不到
阅读全文
摘要:如下图三个文件的目录路径 – project |– 1 | |– 2 | | |– 3 | | | |– owen.py |– A | |– test.py | |– B | | |– C | | | |– et.py 说明:owen.py定义class A(); et.py定义class B()继
阅读全文
摘要:一、函数 1. def定义函数 Python Shell: 2.类和方法Python Shell: 创建类时初始化:Python Shell: 3.类的继承
阅读全文
摘要:一、 for循环实例 1.循环字符串 Python Shell: 2.循环数组Python Shell: 3.一定次数的循环range() Python Shell: range(start,end,step),start为起始数(包含),end为截至(不包含),step为递增的幅度 二、数组与字典
阅读全文
摘要:当使用class定位元素时发现报错: 错误信息:selenium.common.exceptions.InvalidSelectorException: Message: Compound class names not permitted(复合类的名称不允许) 网上查询资料得知: classNam
阅读全文
摘要:当编写自动化脚本,定位浏览器元素时,报如下错误: 代码: 报错: 解决方法: For IE 11 only, you will need to set a registry entry on the target computer so that the driver can maintain a
阅读全文
摘要:问题描述: windows8.1系统,Python3环境安装Selenium2时报错,错误如下: ..... ..... File "F:\软件\python3.6.1\lib\site-packages\pip\compat\__init__.py", line 75,in console_to_
阅读全文
摘要:启动IDLE时报Subprocess Startup Error错误 错误信息 IDLE's subprocess didn't make connection.Either IDLE cant't start a subprocess or personal firewall software i
阅读全文
摘要:链接:https://pan.baidu.com/s/1o7AgHtw Python工具实时更新。
阅读全文
摘要:以IE浏览器为例: 当Python Shell输入下面代码时: 报如下的错误: 后来网上查询得知,是因为Python没有安装相应的浏览器启动器,(可以参照【原文】,以及大神分享的下载插件【地址】),注意下载时IE有32位\64位。 同样的道理,如果要启动IE或谷歌浏览器,也需要下载相关的插件,放到P
阅读全文
摘要:安装Python环境时,还需要安装“setuptools 与 pip”,但是安装setuptools时出现了几个问题,如下: setuptools 与 pip 下载地址如下:https://pypi.Python.org/pypi/setuptoolshttps://pypi.Python.org/
阅读全文