你好,我想在那里我能得到的报告和大量的测试失败或通过测试案例 下面的代码工作时,在正常的Java类跑到运行TestNG的类测试用例...运行测试用例TestNG的框架
@Test
public void make() throws InterruptedException{
System.setProperty("webdriver.chrome.driver","C:\\Users\\sasy\\Desktop\\Akhil\\Selenium\\chromedriver.exe");
WebDriver driver=new ChromeDriver();
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
System.setProperty("org.apache.commons.logging.Log","org.apache.commons.logging.impl.Jdk14Logger");
driver.get("http://198.57.218.124/CRFGLSPL/Private/login.aspx?ReturnUrl=%2fCRFGLSPL%2fPrivate%2fPatientOrganDamageIntermediateVisit.aspx%3fPatientID%3d2&PatientID=2");
driver.findElement(By.xpath("//*[@id='ctl00_ContentPlaceHolder1_txtEmail']")).sendKeys("[email protected]");
driver.findElement(By.xpath("//*[@id='ctl00_ContentPlaceHolder1_txtPassword']")).sendKeys("maryme");
driver.findElement(By.xpath("//*[@id='ctl00_ContentPlaceHolder1_btnLogin']")).click();
driver.findElement(By.xpath("//*[@id='ctl00_ContentPlaceHolder1_btnSubmit']")).click();
driver.findElement(By.xpath("//*[@id='ctl00_ContentPlaceHolder1_btnSubmit']")).click();
//WebElement ID418=driver.findElement(By.xpath("//*[@id='edit41']"));
//WebElement ID830=driver.findElement(By.xpath("//*[@id='edit40']"));
WebElement ID969=driver.findElement(By.xpath("//*[@id='edit37']"));
//WebElement ID472=driver.findElement(By.xpath("//*[@id='edit39']"));
Thread.sleep(3000);
ID969.click();
driver.quit();
}
当上面的代码跑了作为TestNG的测试我正在给下面的错误
FAILED: make java.lang.NoClassDefFoundError: com/google/common/base/Function at first.heha.make(heha.java:16)
你需要从的testng.xml运行>运行的TestNG的套件 – kushal
http://stackoverflow.com/questions/5134953/noclassdeffounderror-in-java-com-google-common-base-function似乎相似到你的问题 – Grasshopper
如果你的问题是根据你的喜好回答的,请考虑标记其中一个答案作为答案:[如何标记问题为答案](https://meta.stackexchange.com/questions/5234/how-does - 接受工作/ 5235#5235) – Thomas