随笔分类 -  Selenium

上一页 1 2 3 下一页

[Selenium]Turn Page By Scroll Bar
摘要:Description:Need to turn page by operating scroll bar and find out the element in the current page.Previous page will not exist in DOM structure when ... 阅读全文

posted @ 2015-06-04 18:04 张缤分 阅读(404) 评论(0) 推荐(0) 编辑

[Selenium]计算坐标进行拖拽,重写dragAndDropOffset
摘要://@author jzhang6 public void dragAndDropOffset(WebDriver driver,WebElement dragableEl, WebElement dropableEl, int offsetX, int offsetY){ Actions act... 阅读全文

posted @ 2015-05-29 09:18 张缤分 阅读(727) 评论(0) 推荐(0) 编辑

[Selenium]等待元素出现之后再消失,界面上的loading icon都属于这种类型,之前的方法总是卡死,换这种方法目前还好用的
摘要:等待元素出现之后再消失,界面上的loading icon都属于这种类型,之前的方法总是卡死,换这种方法目前还好用的/** * Check if the element present with customized timeout * @param driver * @par... 阅读全文

posted @ 2015-05-28 14:34 张缤分 阅读(901) 评论(0) 推荐(0) 编辑

[Selenium]对于某些对话框即有可能弹出来,也有可能不弹出来,这种应该怎么处理呢?
摘要:界面上如果有一个对话框可能弹出来,也可能不弹出,我们都要认为是正常,应该怎么处理呢?/** * check if release notes dialog present * @author j */ public boolean isReleaseNotesDialogPresent(){ ... 阅读全文

posted @ 2015-05-28 12:53 张缤分 阅读(280) 评论(0) 推荐(0) 编辑

[Selenium]通过JavaScript来对隐藏的元素执行操作
摘要:对不可见元素进行操作时,如果通过普通的方式不可行,可以尝试用Javascript Scroll hidden element into view Click hidden element Get text of hidden element 阅读全文

posted @ 2015-05-28 12:50 张缤分 阅读(1022) 评论(0) 推荐(0) 编辑

[Selenium]Release in dragAndDrop doesn't work after i update the version of Selenium to 2.45.0
摘要:在升级Selenium的版本之前,写了一段拖拽的代码,Drag and Drop 都好使的, 但是,将Selenium的版本升级到2.45.0之后,图标拖拽可以成功,释放不生效。试了N多种解决方案都不管用,后来发现下面这种办法可行。一开始在界面可以看得见的,用来进行拖拽的图标是dragable的,在... 阅读全文

posted @ 2015-05-28 09:00 张缤分 阅读(465) 评论(0) 推荐(0) 编辑

[Selenium]怎样等待元素出现之后再消失,譬如Loading icon
摘要:界面上有些元素是要先等它出现,再等它消失,譬如loading icon这个是等多个loading icon出现后消失/** * Wait for loading icon disappear in dialog and Widgets * @author jz */ public void w... 阅读全文

posted @ 2015-05-20 13:51 张缤分 阅读(2399) 评论(1) 推荐(0) 编辑

[Selenium]怎样验证页面是否有无变化
摘要:验证方法:将两次的Dom结构进行对比 String beforeStr = (String) SeleniumUtil.getInnerHTML(page.getDriver(), page.getDLGDataColumnSetting()); el.c... 阅读全文

posted @ 2014-11-20 13:32 张缤分 阅读(702) 评论(0) 推荐(0) 编辑

[Selenium]刷新页面 Refresh page
摘要:5 different ways to refresh a webpage using Selenium Webdriver Here are the 5 different ways, using which we can refresh a webpage.There might be even... 阅读全文

posted @ 2014-11-14 16:00 张缤分 阅读(8004) 评论(0) 推荐(0) 编辑

[SoapUI]怎样获取隐藏元素的文本内容Get text of hidden element
摘要:隐藏元素无法通过gettext()获取其文本内容,须用javascript来获取String actualDataPointName = (String) ((JavascriptExecutor) driver).executeScript( "return jQuery(arguments... 阅读全文

posted @ 2014-11-07 11:01 张缤分 阅读(308) 评论(0) 推荐(0) 编辑

[Selenium]How to click on a hidden link ,move to the drop down menu and click submenu
摘要:Automation Smoke test Template8/11/2014Rachel LvRead Only 场景:需要找到Table中的某一行,然后找到这行的铅笔图标,点这个铅笔图标会出来下拉菜单,然后在下拉菜单中点击Open刚开始写脚本的时候,按照以往的方式会报这样的错误:"Element... 阅读全文

posted @ 2014-08-14 17:35 张缤分 阅读(343) 评论(0) 推荐(0) 编辑

[Selenium]通过Selenium实现在当前浏览器窗口点击一个图标之后,弹出另外一个窗口,关闭这个窗口,再回到原来的窗口进行操作
摘要:public void clickReportIcon(){ String initialWindowHandle = driver.getWindowHandle(); //保存原始的浏览器窗口 page.getReportIcon().click(); //这个操作之后将会弹出另外一个浏... 阅读全文

posted @ 2014-07-23 13:49 张缤分 阅读(1373) 评论(0) 推荐(0) 编辑

[Selenium]如何通过Selenium实现Ctrl+click,即按住Ctrl的同时进行单击操作
摘要:在自动化测试的过程中,经常会出现这样的场景:按住Ctrl的同时,进行单击操作,已达到多选的目的Actions a = new Actions(driver);a.keyDown(Keys.CONTROL).perform();for(int i = 0;i<quantity;i++){ W... 阅读全文

posted @ 2014-07-07 16:51 张缤分 阅读(1647) 评论(0) 推荐(0) 编辑

[Selenium]当DOM结构里面有iFrame,iFrame里面是html,怎么send keys to 里面的body,怎么用Assert进行验证?
摘要:我在测试的过程中遇到一个这样的问题,我无法通过CssSelector找到iFrame下边的html:rrrrrrrt后来我发现只能找到iFrame这里,再往后就找不到了。我用过sendKeys to可以将Text发送给body,但是想通过Assert去验证iFrame的text,无法做到。解决办法:... 阅读全文

posted @ 2014-06-16 16:00 张缤分 阅读(553) 评论(0) 推荐(0) 编辑

[Selenium] jsclick
摘要:SeleniumUtil.jsClick(driver, saveButtonEl); 阅读全文

posted @ 2014-06-10 15:05 张缤分 阅读(249) 评论(0) 推荐(0) 编辑

[Selenium]对弹出的Alert窗口进行操作
摘要:Alert alert = driver.switchTo().alert();alert.accept(); 阅读全文

posted @ 2014-06-06 14:46 张缤分 阅读(362) 评论(0) 推荐(0) 编辑

[Selenium]Eclipse hangs at 57% in debug mode with TestNG tests
摘要:案例1:I am very thankful to saish and cbeust for the solution. I went through the similar issue with eclipse which got stuck at 57% when run in debug mo... 阅读全文

posted @ 2014-05-21 13:50 张缤分 阅读(436) 评论(0) 推荐(0) 编辑

[Selenium] CSS3 选择器
摘要:在 CSS 中,选择器是一种模式,用于选择需要添加样式的元素。"CSS" 列指示该属性是在哪个 CSS 版本中定义的。(CSS1、CSS2 还是 CSS3。)选择器例子例子描述CSS.class.intro选择 class="intro" 的所有元素。1#id#firstname选择 id="fir... 阅读全文

posted @ 2014-05-19 17:32 张缤分 阅读(360) 评论(0) 推荐(0) 编辑

[Selenium]如何实现上传本地文件
摘要:public void uploadLocalFileToServer(String uploadFileName){ String AutomationPath = System.getProperty("user.dir"); String filePath=AutomationPath+"... 阅读全文

posted @ 2014-05-19 17:24 张缤分 阅读(738) 评论(0) 推荐(0) 编辑

[Selenium]显式等待 Explicit wait & 隐式等待 Implicit wait
摘要:显式等待 Explicit wait显示等待 , 就是明确的要等到某个元素出现或者某个元素满足某种条件,每隔一段时间检查一次,等不到,就一直等,如果在规定的时间内还没有找到,就跳出来检查间隔的时间和等待的最大时间可以自定义。等待某个元素的Y坐标满足某个条件,等待时间采用系统默认的时间Function... 阅读全文

posted @ 2014-05-13 17:14 张缤分 阅读(1404) 评论(0) 推荐(0) 编辑

上一页 1 2 3 下一页

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示