上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页
摘要: #encoding=utf-8 import unittest import time import chardet from selenium import webdriver class VisitSogouByIE(unittest.TestCase): def setUp(self): #启动IE浏览器 #self.driver = webd... 阅读全文
posted @ 2018-04-03 16:32 小七Libra 阅读(615) 评论(0) 推荐(0) 编辑
摘要: 操作下拉框中的内容 #encoding=utf-8 import unittest import time import chardet from selenium import webdriver class VisitSogouByIE(unittest.TestCase): def setUp(self): #启动IE浏览器 #self.dri... 阅读全文
posted @ 2018-04-03 16:31 小七Libra 阅读(947) 评论(1) 推荐(0) 编辑
摘要: # 注意: !!!操作操作系统的按键,需要先装pywin32,然后通过交互模式import win32api和import win32con判断是否安装成功,需要重启下cmd进入交互模式# 下载链接: https://pan.baidu.com/s/1oqULscy9i4n266H4wEI3sA 密码: 3ucb#encoding=utf-8 import unittest from selen... 阅读全文
posted @ 2018-04-03 16:30 小七Libra 阅读(1873) 评论(0) 推荐(0) 编辑
摘要: #encoding=utf-8 import unittest import time import chardet from selenium import webdriver class VisitSogouByIE(unittest.TestCase): def setUp(self): #启动IE浏览器 #self.driver = webd... 阅读全文
posted @ 2018-04-03 16:28 小七Libra 阅读(3546) 评论(0) 推荐(0) 编辑
摘要: #encoding=utf-8 import unittest import time import chardet from selenium import webdriver class VisitSogouByIE(unittest.TestCase): def setUp(self): #启动IE浏览器 #self.driver = webd... 阅读全文
posted @ 2018-04-03 16:26 小七Libra 阅读(1580) 评论(0) 推荐(0) 编辑
摘要: #encoding=utf-8 import unittest import time import chardet from selenium import webdriver class VisitSogouByIE(unittest.TestCase): def setUp(self): #启动IE浏览器 #self.driver = webd... 阅读全文
posted @ 2018-04-03 16:24 小七Libra 阅读(8791) 评论(0) 推荐(0) 编辑
摘要: driver.get("http://127.0.0.1/test_enable.html") i1=driver.find_element_by_id("input1") i2=driver.find_element_by_id("input2") i1.is_enabled() #True i2.is_enabled() #False 阅读全文
posted @ 2018-04-03 16:19 小七Libra 阅读(4276) 评论(0) 推荐(0) 编辑
摘要: 判断界面中某一元素是否已经呈现,多用于断言,代码如下: 阅读全文
posted @ 2018-04-03 16:15 小七Libra 阅读(7652) 评论(0) 推荐(0) 编辑
摘要: selenium webdriver可以通过获取页面标题,再跟据标题去切换浏览器窗口,代码如下: 阅读全文
posted @ 2018-04-03 16:13 小七Libra 阅读(1820) 评论(0) 推荐(0) 编辑
摘要: 通过selenium webdriver去切换浏览器的窗口,需要通过句柄,具体代码如下: 阅读全文
posted @ 2018-04-03 16:10 小七Libra 阅读(6634) 评论(1) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页