码迷,mamicode.com
首页 >  
搜索关键字:webelement    ( 168个结果
selenium操作测试对象
1.基本操作元素方法 clear:清除 sendkeys:模拟键输入 click:单击 submit:提交表单 2.webelement接口常用方法 getsize():获取对象的大小 gettext():获取对象的文本 getAttribute():获取对象的属性值 getTagname():获取 ...
分类:其他好文   时间:2017-03-27 19:42:43    阅读次数:191
操作JavaScript的Alert弹框
@Testpublic void testHandleAlert(){ WebElement button =driver.findElement(By.xpath("input")); button.click(); try { //使用driver.switchTo().alert()方法获取A ...
分类:编程语言   时间:2017-03-01 12:23:13    阅读次数:203
xpath定位方法小结(转载)
1、实例化一个浏览器WebDriver driver = new FirefoxDriver();2、driver.get() get传参数到浏览器中3、常用定位方法webelement XX=driver.findElement(by.XX)3.1 by.id("value");3.2 by.am ...
分类:其他好文   时间:2017-02-08 13:26:41    阅读次数:127
selenium打开ie测试小实例
packagemqTest;importjava.io.File;importorg.openqa.selenium.By;importorg.openqa.selenium.WebDriver;importorg.openqa.selenium.WebElement;importorg.openqa.selenium.firefox.FirefoxDriver;importorg.openqa.selenium.ie.InternetExplorerDriver;importorg.openqa.selen..
分类:其他好文   时间:2017-02-07 17:04:02    阅读次数:142
sellenium页面元素的定位方法
1.findElements函数可用于多个元素定位 (1)使用ID定位:driver.findElement(By.id("ID值")); 例:HTML代码: 定位语句代码:WebElement username=driver.findElement(By.id("username")); WebE ...
分类:其他好文   时间:2017-01-12 08:19:12    阅读次数:447
Appium_Python_Client介绍
一、Appium_Python_Client介绍 Appium的实用方法都藏在Client的源码里,对于driver和webelement实例,均有对应的元素查找方法(webelement查找的是下面的子元素),有些儿专门针对手机的函数,则需要在这个Client安装后方可使用。 (以下内容转自:ht ...
分类:移动开发   时间:2016-12-28 20:49:29    阅读次数:225
Selenium-iframe
1.如果iframe有id或者name 2.如果iframe没有id或者name,可以用WebElement对象 3.切回主文档继续操作不在iframe中的元素,可以使用driver.switchTo().defaultContent() 4.如果存在嵌套的iframe,进入子iframe需要一层一 ...
分类:其他好文   时间:2016-12-26 16:17:01    阅读次数:231
selenium高亮显示操作步骤方法
package com.allin.pc;import java.util.List;import org.openqa.selenium.WebElement;import org.openqa.selenium.By;import org.openqa.selenium.JavascriptEx ...
分类:其他好文   时间:2016-12-12 19:27:23    阅读次数:216
selenium处理Ajax浮动框方法
package com.allin.pc;import java.util.List;import org.openqa.selenium.WebElement;import org.openqa.selenium.By;import org.openqa.selenium.JavascriptEx ...
分类:Web程序   时间:2016-12-12 19:13:59    阅读次数:178
Selenium PageFactory使用
通过FindBy查找元素 @FindBy(id="notice01") private WebElement username; 相当于driver.findElement(By.id("notice01")); 示例: (1)测试类: (2)元素类: 执行后: ...
分类:其他好文   时间:2016-12-08 18:29:03    阅读次数:199
168条   上一页 1 ... 7 8 9 10 11 ... 17 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!