摘要:
构造函数:public AppTestData(File xmlFile) throws Exception { file = xmlFile; try { saxReader = new SAXReader(); saxRea... 阅读全文
摘要:
Appium 切换上下文环境,代码如下: private void switchToContext(String sContext) { LogManager.getLogger(this.getClass()).info("Swith to Context: " + sCont... 阅读全文
摘要:
Selenium Grid 运行报错 : Exception thrown in Navigator.Start first time ->Error forwarding the new session Empty pool of VM for setup Capabilities [{platf... 阅读全文
摘要:
在调用resetAPP()时,报错:An unknown server-side error occurred while processing the command.怎么解决呢?请看:额,Appium 的windows UI版的不稳定,重新打开Appium 就行了。 阅读全文
摘要:
直接贴代码: @Parameters({"BrowserType","NodeIP","NodePort"}) public void beforeTest(String sBrowserType, String nodeIP,String nodePort) th... 阅读全文
摘要:
Web网页的时间控件往往嵌入到一个iframe里,抓取页面元素时,总是失败? 不要慌,WebDriver已经有相应的处理方法了。driver.switchTo().frame(driver.findElement(By.id("id")));//返回到上个环境driver.switchTo().de... 阅读全文
摘要:
当需要使用滚动条才能使页面元素显示在视野范围内时,必须用代码处理下,才能对其进行操作。处理其实也很简单,就是调用JS函数.driver.executeScript("arguments[0].scrollIntoView(false);", e);参数e 为WebElement 类型,方法execu... 阅读全文
摘要:
testng的annotations运行顺序为:@BeforeSuite@BeforeTest@BeforeClass@BeforeMethod@AfterMethod@AfterClass@AfterTest@AfterSuite如果测试用例父类 和子类同时有相同的标签,before遵循从外而内的... 阅读全文