I'm new to selenium and I'm trying to create a test which will verify if an element will get displayed after clicking a checkbox from a pop-up window.
Here's my code:
public void getHeaderControl()
{
WorklistPageElements wp = new WorklistPageElements(driver);
wp.getHeaderControl().click();
Assert.assertTrue(wp.getHeaderControl().isEnabled());
WebElement table = driver.findElement(By.id("worklistContent"));
List<WebElement> allControls = table.findElements(By.className("studyListPanelTR"));
for (WebElement row : allControls) {
row.findElements(By.xpath("./*"));
System.out.println(row.getText());
row.click();
//here, I'm thinking of putting an assertion to verify if an element get displayed within the page
}
}
Not sure though how should I do that. Thanks for the help in advance. :)
assertTrue()for element displayed on the line you have your comment. What's the issue?