在自动化过程中,有些导航按钮只有当鼠标悬浮在登录信息上时,它才能出现。这时候如果想要点击导航按钮直接用selenium的webDriver是无法定位的元素的,因为这些元素是隐藏的,只有鼠标悬浮时才出现,所以要记录一下,给大家一个参考 Actions action = new Actions(dr.....
分类:
其他好文 时间:
2015-05-26 20:30:03
阅读次数:
188
下载官网 https://pip.pypa.io/en/latest/installing.html官网截图如下:pip included with Python¶Python 2.7.9 and later (on the python2 series), and Python 3.4 and l...
import osfrom selenium import webdriverfp = webdriver.FirefoxProfile()fp.set_preference("browser.download.folderList",2)fp.set_preference("browser.dow...
分类:
其他好文 时间:
2015-05-25 18:17:17
阅读次数:
167
Ubuntu上安装python-selenium,相对windows下要简单很多。Ubuntu上已经自带了Python 2.7.x, 比如我目前用的是2.7.6.首先下载pip: sudo apt-get install python-pipok以后,使用pip下载安装selenium即可:sudo...
分类:
编程语言 时间:
2015-05-24 14:12:14
阅读次数:
211
selenium sikuli 右键下载 webdriver
分类:
其他好文 时间:
2015-05-22 22:32:37
阅读次数:
181
第一种 先获取元素通过 属性获取WebElement webElemt= webElement.findElement(By.xpath("//*[@class='xxxxxx]/a"));//在ie下使用innerText 在火狐下使用textContentString linktext = we...
分类:
其他好文 时间:
2015-05-22 16:26:01
阅读次数:
246
在selenium中虽然有selectWindow(String windowID) 方法,但是对于一些窗口很难取得其window ID的话,如果开发人员没有在html代码中提供ID ,或者getAllWindowIds()得不到弹出窗口的ID的时候,那么这个方法基本等于没用。那么我们可以这样处理:...
分类:
其他好文 时间:
2015-05-21 19:05:19
阅读次数:
133
为配合较为广泛使用Java 语言的程序员,仅以WebDriver 的Java语言绑定进行讲解。步骤1:下载并安装Java开发环境1)在系统中安装JDK(Java开发工具吧,Java Development Kit)注意: 这里安装的是JDK,而不是单纯的JRE(Java运行时环境,Java Run....
分类:
Web程序 时间:
2015-05-21 17:04:20
阅读次数:
295
selenium sikuli webdriver 测试 automation gui
分类:
其他好文 时间:
2015-05-21 01:21:06
阅读次数:
118
1.sendKeys() 在文本框中输入字符串WebElement searchBox = driver.findElement(By.name("q"));searchBox.sendKeys("webdriver");如果希望在文本框中输入某些特殊字符,如Shift,则需要使用webDriver...
分类:
其他好文 时间:
2015-05-20 18:18:26
阅读次数:
147