So heres the thing I have to do. I want to go to a site like http://www.walmart.com/catalog/allReviews.do?product_id=16561041 and expand all the reviews on the page. I require the reviews to be fully open because I need to collect this data. My current code works but is extremely slow.
public void clickAllLinks(String linkText){
for(int j = 0; j < 20 ; j++){
try{
if(driver.findElement(By.linkText("(read full review)")).isDisplayed())
driver.findElement(By.linkText(linkText)).click();
}catch(NoSuchElementException e){break;}
}
}
使用2.21与火狐驱动器。 有人有什么建议吗? 我对使用很新奇,所以与你们大多数人相比,我对的了解是相当有限的。