-1
link to the page with buttonsSelenium WebDriver、アマゾンでラジオボタンを正しく選択/アサートできませんか?任意のヒント?私の試みの
ワン:条件がfalseの場合
@Test
public void checkRadioBtn()
{
WebElement langEng = driver.findElement(By.xpath(".//*[@id='customer-preferences']/div/div/form/div[1]/div[1]/div[1]/div/label/i"));
if(!langEng.isSelected())
{
langEng.click();
}
assertTrue("English is selected", langEng.isSelected());
}
いるassertTrueが投げるとエラーする必要があります。このオプションが選択されると、AssertionErrorがスローされます。ここで何が起こっているのですか?