次のコードを実行するとNoSuchElementException
が表示されます。IFステートメントの `driver.findElement(...)`をチェックすると、 `NoSuchElementException`がスローされます
if (driver.findElement(By.xpath("//*[@id='gr2']")).isDisplayed()) {
Thread.sleep(5000);
driver.findElement(By.xpath("//*[@id='balInqTableStep2']/td/table/tbody/tr/td/table/tbody/tr[3]/td[4]/input[2]")).click();
}
else {
test.log(LogStatus.FAIL,"Please configure Gift Slabs for this site. Contact business.");
test.log(LogStatus.FAIL,"Second time wallet credit is not done");
}
あなただけの私たちは、この情報を知りたいか、お聞きしたい質問もあるかのようにそれを呼び出すことができますか? – Andersson
例外はどこにありますか? – Guy
'absolute xpath'を実行する代わりに、' relative xpath'を作成してから同じ条件を再度確認してください。 –