摘要:
开发Selenium WebDriver测试时,可以使用页面对象模型,这样可使得测试脚本有更高的可维护性,减少了重复的代码,把页面抽象出来。同时页面对象模型也提供了一个注释,帮助缓存远程,避免出现元素过期的问题。// 定义百度搜索的输入框 @FindBy(id = "kw") @CacheLooku... 阅读全文
摘要:
想要参数化,首先要加入@Parameters({"参数1","参数2"})package com.demo.test;import java.util.concurrent.TimeUnit;import org.junit.Assert;import org.openqa.selenium.By;... 阅读全文
摘要:
testNg官网:http://testng.org/doc/documentation-main.html新建testNG class的时候,同时也新建了一个TestNG.xml的文件。 此xml文件定义了一个测试套件(suite),name属性定义了这个测试套件的名字,这个name会在测试报告... 阅读全文