03 2014 档案
摘要:首先为eclipse添加testng插件步骤如下:help->Install New SoftWare...2. 添加testng链接,该链接可以在这里找到For the Eclipse plug-in, we suggest using the update site:SelectHelp / Software updates / Find and Install.Search for new features to install.New remote site.For Eclipse 3.4 and above, enterhttp://beust.com/eclipse.For
阅读全文
摘要:在验证某些关键步骤时,需要截个图来记录一下当时的情况Webdriver截图时,需要引入import java.io.File;import java.io.IOException;import org.apache.commons.io.FileUtils;import org.openqa.sel...
阅读全文
摘要:selenium获取input时候,发现type=”hidden” 的input无法修改value,经牛人指点,可以使用js修改首先html源文件如下,设置为text 、hidden、submit 1 2 3 this is a test 4 10 11 12 13 Name: 14 Email: 15 16 17 18 19 View Code 在浏览器加载之后如下:这时候email 不能对外显示使用selenium,代码如下 1 import org.openqa.selenium.Alert; 2 import org.openqa.selenium.Javascr...
阅读全文
摘要:package baidu; import java.io.File;import java.io.IOException;import junit.framework.TestCase;import org.apache.commons.io.FileUtils;import org.junit.Test;import org.openqa.selenium.By;import org.openqa.selenium.OutputType;import org.openqa.selenium.TakesScreenshot;import org.openqa.selenium.WebDri.
阅读全文