selenium 自动化测试
来源:互联网 发布:it编程培训中心 编辑:程序博客网 时间:2024/06/14 21:31
selenium github
public class test1 { public static void main(String[] args) throws Exception{ // 谷歌浏览器驱动 System.setProperty("webdriver.chrome.driver", "D:\\selenium\\chromedriver.exe"); // 谷歌浏览器软件地址 ChromeOptions options = new ChromeOptions(); options.setBinary("C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"); WebDriver driver = new ChromeDriver(options); // 驱动的网址 driver.get("http://www.baidu.com/"); // 浏览器窗口变大 driver.manage().window().maximize(); // 定位输入框元素 WebElement txtbox = driver.findElement(By.name("wd")); // 在输入框输入文本 txtbox.sendKeys("HelloWorld"); // 定位按钮元素 WebElement btn = driver.findElement(By.id("su")); // 点击按钮 btn.click(); // 关闭浏览器 //driver.quit(); }}
阅读全文
0 0
- Selenium 自动化测试工具
- Selenium 自动化测试系统
- Selenium 自动化验收测试
- python + selenium 自动化测试
- junit+selenium自动化测试
- 自动化测试:selenium
- 自动化测试--selenium-webDriver
- The Selenium 自动化测试
- selenium自动化测试
- 自动化测试selenium
- selenium java自动化测试
- selenium + python 自动化测试
- selenium java自动化测试
- 自动化测试(selenium)
- selenium 自动化web测试
- Python自动化测试-Selenium
- Selenium自动化测试在
- selenium+Junit自动化测试
- 【python 文本统计】西游记用字统计
- JSP与EL隐式对象
- centos7 防火墙
- 如何向妻子解释OOD
- 联合体(union)的使用方法及其本质
- selenium 自动化测试
- 在VC++应用程序中获取其他程序图标的实现方法
- LeetCode-350. Intersection of Two Arrays II (Java)
- Android Butter Knife 框架——最好用的View注入
- Linux下正则表达式的使用及grep工具
- 关于linux下的openmp编程基础
- 提取anr的traces.txt文件
- Solr5.5.4在linux centOS(6.8)下的安装
- 运行React Native到Android真机上的流程