![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
selenium
qq_26535453
这个作者很懒,什么都没留下…
展开
-
selenium支持的Firefox
http://www.iquicktest.com/selenium-ide-2-0-release.html 这个版本支持Firefox 19 20 在工具栏中新增了selenium的图标原创 2015-08-29 15:31:10 · 428 阅读 · 0 评论 -
ImportError: No module named selenium
参考:http://www.xuebuyuan.com/451338.html 如果能导入selenium模块: import selenium print selenium.__file__ #打印出导入的路径 正确导入:C:\Python27\lib\site-packages\selenium-2.31.0-py2.7.egg\selenium\__init原创 2015-09-26 12:36:00 · 16154 阅读 · 1 评论 -
AttributeError: 'WebDriver' object has no attribute
AttributeError: 'WebDriver' object has no attribute 'switch_to_defaultFrame' 如果查找不到某个对像,会很快就结束了。所以调试时,看到出错,立刻就结束的,说明找不到该对像。原创 2015-09-28 17:14:43 · 12158 阅读 · 0 评论 -
python 操作 编辑器
先找到文本编辑区所在的iframe标签。 切换至iframe标签: 方法1:iframe有id 或 name driver.switch_to_frame("iframename/id") 方法2:iframe无id/name情况 frame=driver.find_element_by_xpath(" ") #切换至iframe driver.switch_to_frame(fr原创 2015-09-28 09:11:03 · 337 阅读 · 0 评论 -
selenium回放按钮不可用。
options--Format---HTML 可以 录制简单脚本,回放不成功。常见情况 1.弹出窗被FIrefox阻止, 2.一些对像无法识别原创 2015-09-11 17:00:59 · 500 阅读 · 0 评论 -
python打开自已配置的firefox
firefox自已配置文件: 1.CMD,找到安装目录,运行 firefox.exe -ProfileManager -no-remote 2.点击“start firefox" 3.在新启动的firefox中安装自已需要的配置。 参考:http://lijingshou.iteye.com/blog/2085276 使用自已的配置启动firefox:原创 2015-09-29 11:58:17 · 420 阅读 · 0 评论 -
python 操作文本编辑器
遇到非常规的上传文件: 参考:http://blog.chinaunix.net/uid-26235486-id-3362291.html js1="var s=document.getElementById(\"snid1\");s.value=\"0\";" js2="var q=document.getElementById(\"snu1\");q.val原创 2015-09-30 09:33:18 · 678 阅读 · 0 评论 -
执行多个用例
在eclipse中 run as python unit-test时 可执行两个类。 # -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Key原创 2015-09-30 10:38:57 · 1185 阅读 · 0 评论 -
python运行类,能够执行
test_um_test.py: importunittestfromunnecessary_math import multiply classTestUM(unittest.TestCase): defsetUp(self): pass def test_number_3_4(self): self.assertEqual(multi原创 2015-09-30 09:42:16 · 514 阅读 · 0 评论