Currently conducting testing on a webpage that features multiple tabs grouped within a tabset
created using ng-repeat
.
The tabs are dynamically generated by the following code snippet:
<tabset id="tabset">
<tab ng-repeat="server in servers">
<tab-heading>{{server.name}}</tab-heading>
<div>{{server.body}}</div>
</tab>
</tabset>
My current testing approach involves:
@Test
public void shouldDisplayAtLeastOneServer() {
Assert.assertThat(webDriver.findElement(By.id("tabset"))
.findElements(By.tagName("tab"))
.size(), Matchers.greaterThan(0));
}
However, this test is failing as the size returned is 0 despite knowing that there are 4 visible tabs.