Selenium WebDriver API 实例详解(一)
摘要:1、访问某网页地址 第一种:driver.get(url); 第二种:driver.navigate().to(url); 2、访问上一个访问的网页 driver.navigate().back(); 3、访问下一个网页(模拟单击浏览器的前进功能) driver.navigate().forward
阅读全文
selenium-webdriver层级定位元素
摘要:/*<div id="divId"> <input id="userid" type="text" value="liuhaixia" title="用户名" name="userid" class="uid"> <input id="password" type="password" value=
阅读全文
selenium-webdriver定位多个元素
摘要:/*<div id="divId"> <input id="userid" type="text" value="liuhaixia" title="用户名" name="userid" class="uid"> <input id="password" type="password" value=
阅读全文
selenium-webdriver八种定位元素的常用方式
摘要:/*<div id="divId"> <input id="userid" type="text" value="liuhaixia" title="用户名" name="userid" class="uid"> <input id="password" type="password" value=
阅读全文
selenium-webdriver启动时开启firebug
摘要:File file = new File("D:/software/firefox/firebug-2.0.16-fx.xpi"); FirefoxProfile profile = new FirefoxProfile(); profile.addExtension(file); profile.
阅读全文
selenium-webdriver基础应用(包含登录以及系统业务处理)
摘要:本案例是实现的功能是登录系统后添加一个部门,然后退出系统。 1、 环境jdk1.7+selenium-server-standalone-2.49.0.jar+firefox44+myeclipse10.7 2、 新建工程selenium,将selenium-server-standalone-2.
阅读全文