02 2017 档案

摘要:首先下载Chrome Driver(Firefox Driver的安装与该步骤相同) 链接: http://chromedriver.storage.googleapis.com/index.html 接下来在控制台(terminal)上操作一下红色字体的指令: Install Unzip sudo 阅读全文
posted @ 2017-02-04 18:05 留白* 阅读(3200) 评论(0) 推荐(0)
摘要:方式1: 阅读全文
posted @ 2017-02-04 17:54 留白* 阅读(779) 评论(0) 推荐(0)
摘要:针对Chrome浏览器: 在自动化测试的编写中如果报出Element is not visible to click at xxxx point时,我会使用: new Actions(WebDriver webDriver).moveToElement(WebElement webElement). 阅读全文
posted @ 2017-02-04 11:35 留白* 阅读(368) 评论(0) 推荐(0)
摘要:如果一个项目A想要引用另一个项目B的资源的话,按照一下步骤进行设置: 右键点击项目A >>>Build Path >>>Configure Build Path... >>>在弹出的对话框中选择Projects选项卡 >>>点击Add >>>选择项目B进行添加。 备注: 如果项目A关联了项目B,再使 阅读全文
posted @ 2017-02-04 10:57 留白* 阅读(2987) 评论(0) 推荐(0)
摘要:assertTrue 分析: 示例: boolean value=webDriver.findElement(By.xpath("......")).isDisplay();//判断是否显示xx assertTrue("Failed to go to the Login page", value); 阅读全文
posted @ 2017-02-03 18:09 留白* 阅读(26145) 评论(0) 推荐(0)
摘要:定义一个类,在类的上方添加@RunWith(Suite.class)和@SuiteClasses({XX.class,YY.class,...})实例有两个类分别为:public class Login{ @Beforepublic void setUp() throws Exception{... 阅读全文
posted @ 2017-02-03 17:43 留白* 阅读(345) 评论(0) 推荐(0)
摘要:在eclipse主窗口最上面的工具条选项中,找到Window,点击里面的Reset Perspective,即可,这样视图就重置了。 在eclipse主窗口最上面的工具条选项中,找到Window,点击里面的Reset Perspective,即可,这样视图就重置了。 Path: Window>>>> 阅读全文
posted @ 2017-02-03 11:52 留白* 阅读(2472) 评论(0) 推荐(1)
摘要:import static org.hamcrest.CoreMatchers.allOf; import static org.hamcrest.CoreMatchers.anyOf; import static org.hamcrest.CoreMatchers.both; import sta 阅读全文
posted @ 2017-02-03 11:03 留白* 阅读(1033) 评论(0) 推荐(0)
摘要:@BeforeClass public static void setUpBeforeClass() throws Exception { } @AfterClass public static void tearDownAfterClass() throws Exception { } 1)使用@ 阅读全文
posted @ 2017-02-03 10:03 留白* 阅读(2494) 评论(0) 推荐(0)