码迷,mamicode.com
首页 >  
搜索关键字:webelement    ( 168个结果
selenium依次点击页面的删除按钮
需要依次点击页面的删除按钮,如下图: @Test public static void FaBu() { TestMenuJump.jumpExam(driver); TestMenuJump.jumpExamPa(driver); WebElement wes = driver...
分类:其他好文   时间:2015-06-29 21:44:59    阅读次数:121
Selenium 疑难杂症
1. jsclick 也不管用Actions action = new Actions(driver); WebElement theRow = page.getInvisibleElement(); action.moveToElement(theRow).perfor...
分类:其他好文   时间:2015-06-24 18:19:34    阅读次数:101
Selenium2学习-011-WebUI自动化实战实例-009-JavaScript 在 Selenium 自动化中的应用实例之一(赋值)
通常在编写 Selenium 的 WebUI 自动化脚本时,有些元素不易定位元素,或有些元素为隐藏的(此时用 WebElement.getText() 获取其值的时候,返回的结果为空),对日常的 UI 自动化脚本的编写造成了一定程度的影响。若亲有一定的前段开发基础,肯能会想到可否通过 JavaScr...
分类:编程语言   时间:2015-06-17 15:11:48    阅读次数:170
Selenium解决页面元素不在视野范围内的问题
当需要使用滚动条才能使页面元素显示在视野范围内时,必须用代码处理下,才能对其进行操作。处理其实也很简单,就是调用JS函数.driver.executeScript("arguments[0].scrollIntoView(false);", e);参数e 为WebElement 类型,方法execu...
分类:其他好文   时间:2015-06-16 16:42:42    阅读次数:384
移动鼠标(令不可见元素转为可见)
// get invisible element Actions action = new Actions(driver); WebElement theRow = page.getInvisibleElement(); action.moveToElement(theRow).per...
分类:移动开发   时间:2015-06-15 16:15:02    阅读次数:126
[Selenium]重写拖拽dragWidgetToElementContainner()
public void dragWidgetToElementContainner(String widgetName, String targetPosition){ WebElement widgetIconEl=page.getWidgetIconInDockMenu(widgetName)....
分类:其他好文   时间:2015-06-09 16:14:03    阅读次数:169
[Selenium]计算坐标进行拖拽,重写dragAndDropOffset
//@author jzhang6 public void dragAndDropOffset(WebDriver driver,WebElement dragableEl, WebElement dropableEl, int offsetX, int offsetY){ Actions act....
分类:其他好文   时间:2015-05-29 09:44:41    阅读次数:809
Selenium操作页面元素
转自:http://blog.sina.com.cn/s/blog_6966650401012a7q.html一、输入框(text field or textarea)//找到输入框元素:WebElement element = driver.findElement(By.id("passwd-id...
分类:其他好文   时间:2015-05-28 17:50:40    阅读次数:176
关于selenium webdriver
//搜索二手房 ?import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.WebElement;? public class NewTest{??...
分类:Web程序   时间:2015-05-28 11:04:16    阅读次数:320
Selenium 获取隐藏元素的内容
第一种 先获取元素通过 属性获取WebElement webElemt= webElement.findElement(By.xpath("//*[@class='xxxxxx]/a"));//在ie下使用innerText 在火狐下使用textContentString linktext = we...
分类:其他好文   时间:2015-05-22 16:26:01    阅读次数:246
168条   上一页 1 ... 12 13 14 15 16 17 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!