selenium一个具体页面的实现(结合autoit3和sikuli)
2016-04-15 22:28
507 查看
1、添加成果界面及dom结构
2、点击上传证明后的界面及dom结构
3、利用上篇文章我们就可以很容易对上述页面进行操作
package com.wiley.enterprise; import org.openqa.selenium.By; import org.sikuli.script.FindFailed; import org.testng.annotations.Test; public class AddProperty extends BaseTest { @Test(description = "添加成果") public void addProperty() throws FindFailed, InterruptedException{ // 成果名称 this.sendKeys(By.name("title"), "计算机二进制设计"); // 成果类型 this.selectByValue("patent_type_id", "211"); // 证书编号 this.sendKeys(By.name("cert_no"), "123456"); // 获得年度 this.selectByValue("cert_year", "2013"); // 上传证明 this.clickEle(By.xpath("//span[@title='上传证明']")); this.uploadFile(By.xpath("//span[@to='upload-list-cert_file_id']"), "E:\\test\\add_cq.png"); this.clickEle(By.xpath("//button[text()='保存']")); } }
4、查看结果
相关文章推荐
- autoit3最新汉化版下载
- AutoIt3和按键精灵的功能对比第1/2页
- 针对Ruby的Selenium WebDriver安装指南
- Selenium处理select标签的下拉框
- Python中使用 Selenium 实现网页截图实例
- selenium grid2 初探
- UI自动化测试框架之Selenium关键字驱动
- selenium使用chrome时,报错ignore certificate errors
- 利用 Selenium 自动化 web 测试
- Xampp安装PHPUnit
- selenium学习3 selenium for IE8+WIN7
- Selenium官文翻译--(一)目录
- Selenium官文翻译--(二)Selenium WebDriver(未完待续)
- 2016年的自动化测试趋势
- Selenium关于下拉列表的定位方法总结
- 用C#.NET 与Webdriver写的抓取网页信息的小工具
- [selenium + eclipse + testng]Build environment
- selenium-ide安装与使用
- selenium学习笔记(1)--webdriver中时间控件的使用
- 用Selenium RC插件测试远程应用