06 2015 档案
摘要:直接贴代码: @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遵循从外而内的...
阅读全文
摘要:开发在做Web系统时,用的是css div划分层,使用jQuery 选取元素。
阅读全文
摘要:简单解析自己定义的xml文件,首先,给解析xml文件的类来个构造方法: 1 public xmlData(File xmlFile) { 2 file = xmlFile; 3 try { 4 saxReader = new SAXReade...
阅读全文
浙公网安备 33010602011771号