import org.openqa.selenium.By;import org.openqa.selenium.WebDriver;import org.openqa.selenium.WebElement;import org.openqa.selenium.chrome.ChromeDrive...
分类:
其他好文 时间:
2014-12-09 19:12:53
阅读次数:
148
WebElement menu1=driver.......WebElement menu2=driver.......Actions builder = new Actions(driver); Actions hoverOverRgeistrar = builder.moveToElement....
分类:
其他好文 时间:
2014-12-05 18:57:50
阅读次数:
599
Set bp=browser("micclass:=browser","index:=0").page("micclass:=page")bp.WebElement("html tag:=BODY","index:=1").Object.insertadjacenttext "beforeend",...
分类:
Web程序 时间:
2014-11-26 15:57:19
阅读次数:
217
public static void type(WebElement e,String str) throws InterruptedException { String[] singleCharacters = str.split(""); // Interva...
分类:
其他好文 时间:
2014-11-17 19:22:52
阅读次数:
222
在用selenium做测试时,会遇到需要操作的元素不在当前可视页面中的情况,如果是手工测试,自然很简单,手动拖拽滚动条到目标元素处即可。那么,selenium如何实现这种情形呢?答案是需要借助Javascript.Java代码如下:1 WebElement target = driver.findE...
分类:
移动开发 时间:
2014-10-11 20:51:26
阅读次数:
200
录制输入富文本框内容无脚本生成解决办法:1、将富文本框加入到对象库中2、编写脚本如下'Browser("通用呼叫中心后台").Page("通用呼叫中心后台_2").Frame("Frame").WebElement("html tag:=p").Object.innerText="nei5555r"...
分类:
其他好文 时间:
2014-09-26 19:10:38
阅读次数:
162
Browser("XXX").Page("XXX").Frame("iframe_main").WebElement("TB-50").Click对WebElement("TB-50") 的“TB-50”进行参数化,脚本中选中TB-50,右击-object properties,对选中内容进行参数化...
分类:
其他好文 时间:
2014-09-17 10:10:31
阅读次数:
228
可能大家会遇到同样的问题,用Selenium IDE录制单选框或多选框后,在脚本中,如果想根据不同的用例,选择不同的单选框或多选框的业务流程时,在WebDriver代码中如何维护呢?这里有简单处理的两种方法:
方法一:
WebElement select = dirver.findElement(By.xpath(“//selenium”));
List allOptions = selec...
分类:
Web程序 时间:
2014-08-17 11:51:12
阅读次数:
1997
QTP默认录制方式无法录制下拉菜单,需修改设置后再录制修改设置如下:1、Record->webeventrecordingconfiguration-----customsettings...展开Webobjects2、选中webelement,点击event->add->。并确定在record栏内,状态是enabled3、重新录制你的脚本4、录制完成后,执..
分类:
其他好文 时间:
2014-07-28 16:47:04
阅读次数:
183
TouchAction
AppiumDriver的辅助类,主要针对手势操作,比如滑动、长按、拖动等。TouchAction的原理是讲一系列的动作放在一个链条中,然后将该链条传递给服务器。服务器接受到该链条后,解析各个动作,逐个执行。
press(WebElement el)
在控件上执行press操作。
press(int x, int y)
在坐...
分类:
移动开发 时间:
2014-07-23 00:05:07
阅读次数:
293