![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
selenium
mark_bobobo
这个作者很懒,什么都没留下…
展开
-
selenium webelement 操作浏览器滚动
1、window.scrollTo(0,document.body.scrollHeight);2、window.scrollTo(0, document.body.scrollHeight || document.documentElement.scrollHeight);3、$('html, body').animate({ scrollTop: $('footer').off原创 2017-03-07 14:05:31 · 515 阅读 · 0 评论 -
selenium webdriver定位方式
1、css定位:http://www.w3.org/TR/css3-selectorshttp://www.w3school.com.cn/css/css_positioning.asp2、xpath定位:http://www.w3.org/TR/xpathhttp://www.w3schools.com/xpath/default.asphttp://原创 2017-03-07 14:21:54 · 1542 阅读 · 0 评论 -
selenium+Python+unittest运行启动jar包服务:
1、下载:selenium-server-standalone-2.52.0.jar2、运行用例的时候,首先启动服务:java -jar selenium-server-standalone-2.52.0.jar原创 2017-03-07 14:28:37 · 308 阅读 · 0 评论 -
selenium+python:自动化po分层
1、#重写元素定位方法224 def find_element(self,*loc): # *loc 函数的可变参数25 #return self.driver.find_element(*loc)26 try:27 WebDriverWait(self.driver,10).until(lambda driver: driver.find_element(*loc).is_di原创 2017-03-07 14:46:45 · 2980 阅读 · 0 评论 -
selenium+python:基本用法
原创 2017-03-07 14:50:30 · 240 阅读 · 0 评论 -
selenium webdriver 模拟键盘操作
module:selenium.webdriver.common.keys• class Keys()– NULL = u’ue000’– CANCEL = u’ue001’ # ^break– HELP = u’ue002’– BACK_SPACE = u’ue003’– TAB = u’ue004’– CLEAR = u’ue005’– RETURN = u’u原创 2017-03-07 14:53:55 · 554 阅读 · 0 评论 -
RobotFramework安装简易步骤
1、安装python2、 Robot framework :robotframework-3.0.1.tar.gz3、 Robot framework-ride:robotframework-ride-1.5.1.tar.gz4、 wxPython :wxPython2.8-win64-unicode-2.8.12.1-py27.exe5、 Robot framework-sele原创 2017-03-07 15:05:50 · 437 阅读 · 0 评论 -
通过chrome利用xpath定位页面元素
1、document.getElementById("btn-edit").click()2、function getElementByXpath(path) { return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;}原创 2017-03-07 14:07:29 · 6333 阅读 · 0 评论