请建议如何在单个方法中返回多个数组字符串:
public ArrayList<String> scraptable() throws InterruptedException {
pui = new Polled(driver);
ArrayList<String> firstname = new ArrayList<String>();
ArrayList<String> lastname = new ArrayList<String>();
ArrayList<String> email = new ArrayList<String>();
WebElement usertable = pui.tbl_userlist;
List<WebElement> allRows = usertable.findElements(By.tagName("tr"));
for (int row = 1; row < allRows.size(); row++) {
String Firstname = driver.findElement(
By.xpath("//*[@id='tbUserList']/tbody/tr[" + row
+ "]/td[2]")).getText();
firstname.add(Firstname);
String Lastname = driver.findElement(
By.xpath("//*[@id='tbUserList']/tbody/tr[" + row
+ "]/td[3]")).getText();
lastname.add(Lastname);
String Email = driver.findElement(
By.xpath("//*[@id='tbUserList']/tbody/tr[" + row
+ "]/td[4]")).getText();
email.add(Email);
}
return null;
我需要返回firstname
、、lastname
和email
数组字符串,怎么可能返回多个数组字符串?