摘要:Problem: In web UI automation testing, we always need to upload files, it will work well on local machines, but doesn't work on remote node machines w
阅读全文
摘要:问题: 测试的某个产品登陆之后有个引用外部站点js的请求半天都无法返回: https://cdn.heapanalytics.com/js/heap-3497400264.js 导致网页一直在打转,Selenium的driver也无法对页面进行下一步的操作。 这个js当时在美国的机器上可以马上返回,
阅读全文
摘要:How to convert HTML Report to picture format in Email? So that we can see the automation report also at home or on mobile phone anywhere.We tried to u
阅读全文
摘要:https://www.guru99.com/xpath-selenium.html
阅读全文
摘要:Two Ways To Install TestNG in Eclipse/STS Today I install the newest Sprint Tool Suite and want to install TestNG by using Makrketplace, but i cannot
阅读全文
摘要:Evaluate and validate XPath/CSS selectors in Chrome Developer Tools Method 1 : From Elements panelUse the search function inside Elements panel to eva
阅读全文
摘要:SVG 意为可缩放矢量图形(Scalable Vector Graphics)定位svg元素要用xpath的name()函数,比如//svg/line[2],要用//*[name()='svg']/*[name()='line'][2]"代替刚验证了一下,这样写是可以的//div[@class='t
阅读全文
摘要:两种在线安装方式: 1、通过Eclipse Marketplace安装; 在浏览器中拖拽“Drag to your running Eclipse workspace to install TestNG for Eclipse”链接至Eclipse的工作空间,即可启动Eclipse Marketpl
阅读全文
摘要:在使用 Selenium WebDriver 做自动化测试的时候,会经常模拟鼠标和键盘的一些行为。比如使用鼠标单击、双击、右击、拖拽等动作;或者键盘输入、快捷键使用、组合键使用等模拟键盘的操作。在 WebDeriver 中,有一个专门的类来负责实现这些测试场景,那就是 Actions 类,在使用该类
阅读全文
摘要:Note : 先在Hub和Node的机器上安装好JDK, IE浏览器,Chrome浏览器,Firefox浏览器 准备好红色框标示的东西: Hub.bat :启动Hub AllNodes.bat :启动Node selenium-server-standalone-2.52.0.jar :seleni
阅读全文
摘要:测试的产品登陆之后有个引用外部站点js的请求半天都无法返回: https://cdn.heapanalytics.com/js/heap-3497400264.js 这个js如果是在美国的机器上就可以马上返回,应该是中国给屏蔽了。 解决办法: 1.保存这个js的返回结果到本地: 2.在中国找一台服务
阅读全文
摘要:实施自动化测试前需要对软件开发过程进行分析,以观察其是否适合使用自动化测试。通常需要满足以下条件: 1)需求变动不频繁 2)项目周期足够长 3)自动化测试脚本可重复使用 4)手工测试无法完成或者需要大量的时间和人力
阅读全文
摘要:import java.awt.Dimension; import java.awt.DisplayMode; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.Insets; i
阅读全文
摘要:import java.awt.Dimension; import java.awt.GraphicsEnvironment; import java.awt.Insets; import java.awt.Rectangle; import java.awt.Toolkit; Rectangle
阅读全文
摘要:driver.manage().window().maximize(); //将浏览器设置为最大化的状态 driver.manage().window().setSize(new Dimension(600, 400)); //将浏览器的大小自定义为600*400
阅读全文
摘要:public void clickDateDropDownButton() { SeleniumUtil.jsClick(driver, page.getDateDropdownButtonOfInvPolicyDialog()); WebElement dropDown = page.getDro
阅读全文
摘要:public void dragWidgetToElementContainner(String widgetName, String targetPosition){ WebElement widgetIconEl=page.getWidgetIconInDockMenu(widgetName)...
阅读全文
摘要:当Case在本地运行成功,在Grid模式下运行失败时,我们需要在Grid模式下进行调试,同时登录远程的node去查看运行的情况。Hub是随机将case分配到某台node上运行的,怎样知道当前的case是运行在哪台node上呢?可以通过这段代码获取node的信息:public void getComp...
阅读全文
摘要:点击下拉框之后,下拉列表会显示出来,但是有时候下拉列表会很快就消失掉,导致后面选择元素的时候会失败。像这种情况,需要将鼠标移动到下拉列表上,使下拉列表维持显示,然后才选择元素进行点击。将鼠标移动到下拉列表上,有时候只要提供整个下拉列表的Dom结构就可以,有时候下拉列表很长,这种方式也会失败。后来采用...
阅读全文
摘要:Description:Find outthe DDLin Treegrid, but cannot clickonit.Because the element is under a hidden element.Have tried all below solutions:1) theDDL.cl...
阅读全文