1 import java.io.File; 2 3 import org.openqa.selenium.By; 4 import org.openqa.selenium.WebDriver; 5 import org.openqa.selenium.WebElement; 6 import .....
分类:
其他好文 时间:
2014-07-11 18:45:05
阅读次数:
196
1. Appium测试 (功能测试,用户接受度测试,黑盒测试) - Rating: 8
Website: http://appium.io/
Appium测试相当于黑盒测试。只是测试UI逻辑正确性。所以Appium测试框架提供的方法有限。获取一个AppiumDriver对象。该对象只是有很多findElements()的方法,获取到UI元素。UI元素是WebElement,这个类提...
分类:
移动开发 时间:
2014-07-03 17:58:55
阅读次数:
369
robotium框架支持WebView,在robotium中有getWebElements()、getWebElements(By by)等方法来获取android中的WebView的元素,并提供了 clickOnWebElement方法来完成点击事件.android中的原生控件是比较好获取的,那么对于WebView这个框架是怎么获取的呢。第一步:利用JS获取页面中的所有元素 在PC...
分类:
Web程序 时间:
2014-06-30 00:33:18
阅读次数:
227
WebElement
接口常用方法:size,text,get_attribute(),is_displayed()
分类:
其他好文 时间:
2014-06-03 07:28:05
阅读次数:
188
selenium
WebDriver定位元素是通过findElement()和findElements()方法。findElement()方法返回一个基于指定查询条件的WebElement对象或是抛出一个没有找到符合条件元素的异常。findElements()方法会返回匹配指定查询条件的webEle...
分类:
其他好文 时间:
2014-05-17 13:01:19
阅读次数:
239
实现如何在浏览器中新开一个tab,并输入url.
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.Keys;
WebElement elem...
分类:
其他好文 时间:
2014-05-13 07:50:42
阅读次数:
216
webdriver
获取表格内的文案:先定位到表格,再使用getText()方法重新封装getText()方法,如下所示 public String getText(String
xpath){ WebElement e = driver.findElement(By.xpath(xpath));....
分类:
Web程序 时间:
2014-05-05 11:14:58
阅读次数:
304
1.目的:为了将元素的find方法和业务逻辑分开来。如果元素的页面位置发生了变化,只需改动一个文件,而不影响业务的实现。2.原理:一般一个页面对应一个class,在class里描述所有要用到的webelement。通过PageFactory.initWebElement(Webdriver
d,th...
分类:
其他好文 时间:
2014-04-30 17:58:23
阅读次数:
337