伙计们,这是我需要将网站地址放入 Excel 表格的代码......但我无法这样做。它现在向我显示任何类型的错误,但输出也没有打印。请帮助。
@Test
public void f() throws Exception {
driver.findElement(By.xpath(".//*[@id='wrapper-all']/table[2]/tbody/tr[1]/td[2]")).click();
Thread.sleep(3000);
driver.findElement(By.linkText("Uptime, %")).click();
Thread.sleep(2000);
List<WebElement> table = driver.findElement(By.xpath(".//*[@id='wrapper-all']/table[2]/tbody/tr[1]/td[2]")).findElements(By.xpath(".//*[@id='wrapper-all']/table[2]/tbody/tr[1]/td[2]/table[1]/tbody/tr[2]/td[1]/a/img"));
List<WebElement> list = driver.findElement(By.xpath(".//*[@id='wrapper-all']/table[2]/tbody/tr[1]/td[2]")).findElements(By.xpath(".//*[@id='wrapper-all']/table[2]/tbody/tr[1]/td[2]/table[1]/tbody/tr[3]/td[2]"));
Thread.sleep(2000);
System.out.println(list.size());
}
@BeforeTest
public void beforeTest() {
driver = new FirefoxDriver();
driver.get("http://www.proxy4free.com/list/webproxy_uptime1.html");
}