1
以下のif
条件で何が問題になっていますか?両方の文字列が同じ値の場合、if
-conditionには入っていません。Java SeleniumでIF条件が機能しない
for(int j=0; j<types; j++){
List<WebElement> category = driver.findElements(By.xpath("//li[@class='pure-menu-selected']"));
for(int k=0; k<category.size(); k++){
String matchtype_from_excel = tours.getRow(x).getCell(j).getStringCellValue().toUpperCase().trim();
String matchtype_from_entry = driver.findElement(By.xpath("//li[@class='pure-menu-selected']["+k+"+1]/a")).getText().toUpperCase().trim();
if(matchtype_from_excel.equals(matchtype_from_entry)){
category.get(k+1).click();
}
}
}