![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Selenium
duoluohua
这个作者很懒,什么都没留下…
展开
-
WebDriver——PageObject
package com.ahchoo.automation.page; importorg.openqa.selenium.By;importorg.openqa.selenium.WebDriver;importorg.openqa.selenium.WebElement;public class BaiduIndexPage { privateWebDriver转载 2012-09-26 11:55:14 · 437 阅读 · 0 评论 -
selenium中AddSelection的用法
此方法一般很少用。看了selenium的源码。下面首先看一下selenium的doSelect方法。也就是我们在选择下拉菜单用的select方法。可以通过index,label,value,id四种方式来select下拉菜单中的option。doSelect源码如下:Selenium.prototype.doSelect = function(selectLocator, optionLocato...2012-11-08 14:46:00 · 194 阅读 · 0 评论 -
在selenium中使用JQuery
执行以下步骤1.把JQuery的js文件添加到selenium-server.jar的/core/scripts目录下.2.修改selenium-server.jar/core/RemoteRunner.html,加入jquery js文件的引用.3.调用selenium.addLocationStrategy方法添加一个selenium的查找策略,第一个参数是策略名称,第二个参数是查找所用到的...2012-11-08 14:45:00 · 167 阅读 · 0 评论 -
webdriver高级API----HamcrestWebDriverTestCase
一种为webdriver高级APIapi很像外语句子.但是api的使用在项目中很有限制.起辅助作用.下面来看一下过程。1.继承HamcrestWebDriverTestCase2.选择一种Webdriver来实现createDriver() 方法。比如FirefoxDriver等3.用类似goTo(),clickOn()等动作来浏览页面。4.用assertPresenceOf(...)来判断...2012-11-08 14:32:00 · 60 阅读 · 0 评论 -
selenium的WindowsUtils类
private static final int CPUTIME = 500;private static final int PERCENT = 100;private static final int FAULTLENGTH = 10;public static void main(String[] args) {WindowsUtils wu=new WindowsUtils();Syste...2013-04-02 14:41:00 · 195 阅读 · 0 评论 -
在selenium中使用JQuery
执行以下步骤1.把JQuery的js文件添加到selenium-server.jar的/core/scripts目录下.2.修改selenium-server.jar/core/RemoteRunner.html,加入jquery js文件的引用.3.调用selenium.addLocationStrategy方法添加一个selenium的查找策略,第一个参数是策略名称,第二个参数是查转载 2012-11-08 14:45:08 · 4712 阅读 · 0 评论 -
selenium的WindowsUtils类
private static final int CPUTIME = 500;private static final int PERCENT = 100;private static final int FAULTLENGTH = 10;public static void main(String[] args) {WindowsUtils wu=new WindowsU转载 2013-04-02 14:41:35 · 1099 阅读 · 0 评论 -
selenium中AddSelection的用法
此方法一般很少用。看了selenium的源码。下面首先看一下selenium的doSelect方法。也就是我们在选择下拉菜单用的select方法。可以通过index,label,value,id四种方式来select下拉菜单中的option。doSelect源码如下:Selenium.prototype.doSelect = function(selectLocator, option转载 2012-11-08 14:46:24 · 949 阅读 · 0 评论 -
webdriver高级API----HamcrestWebDriverTestCase
一种为webdriver高级APIapi很像外语句子.但是api的使用在项目中很有限制.起辅助作用.下面来看一下过程。1.继承HamcrestWebDriverTestCase2.选择一种Webdriver来实现createDriver() 方法。比如FirefoxDriver等3.用类似goTo(),clickOn()等动作来浏览页面。4.用assertPre转载 2012-11-08 14:32:21 · 408 阅读 · 0 评论 -
WebDriver——PageObject
package com.ahchoo.automation.page; importorg.openqa.selenium.By;importorg.openqa.selenium.WebDriver;importorg.openqa.selenium.WebElement;public class BaiduIndexPage {privateWebDriver dri...2012-09-26 11:55:00 · 102 阅读 · 0 评论