In web site,there is more web elements which id is authourList and i want to get into array. My Solution is that,combine all elements to one stringt and split this string with ")" .
Thank you
WebDriver driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get("http://ift.tt/2mpwOFz");
String string = driver.findElement(By.id("authorsList")).getText();
String [] test=new String[80];
for(int i =0;i<81;i++){
test[i]=string.split(")");
System.out.print(test[i]);
}
Aucun commentaire:
Enregistrer un commentaire