Esempio n. 1
0
  @Test
  public void testLast() {
    ElementLocator locator = mock(ElementLocator.class);
    when(locator.findElements()).thenReturn(Arrays.asList(element1, element2, element3));

    List<WebElement> webElementList = LocatorProxies.createWebElementList(locator);
    WebElement last = LocatorProxies.last(webElementList);

    assertThat(LocatorProxies.loaded(last)).isFalse();
    assertThat(last).isEqualTo(element3);
  }