public void deactivateDropDownIfPresent() { if (dropDownLinkId.isPresent()) { List<PageElement> elementList = elementFinder.findAll(By.id(dropDownLinkId.get())); if (elementList.size() > 0) { waitUntilTrue(elementList.get(0).timed().isVisible()); if (elementList.get(0).hasClass("aui-dropdown2-active")) { elementList.get(0).javascript().mouse().click(); } } } }
public void hover() { activateDropDownIfPresent(); webItem.javascript().mouse().mouseover(); }
public void sync() { rootElement.javascript().mouse().mouseover(); final PageElement syncIcon = getSyncIcon(); waitUntilTrue(syncIcon.timed().isPresent()); TimedQuery<Long> lastSync = Queries.forSupplier(timeouts, () -> NumberUtils.toLong(syncIcon.getAttribute("data-last-sync")), TimeoutType.SLOW_PAGE_LOAD); final long lastSyncBefore = lastSync.now(); syncIcon.javascript().mouse().click(); waitUntil(lastSync, greaterThan(lastSyncBefore)); waitUntilFalse(syncIcon.withTimeout(TimeoutType.SLOW_PAGE_LOAD).timed().hasClass("running")); }
public AccountRepository enableRepo(final RepoNameId repoNameId) { this.select2.click(); waitUntilTrue("select 2 drop should be visible", elementFinder.find(By.id("select2-drop")).timed().isVisible()); this.elementFinder.findAll(By.cssSelector("#select2-drop li.select2-result-selectable")) .stream() .filter(li -> li.find(By.cssSelector("div")).getText().equalsIgnoreCase(repoNameId.getName())) .findFirst() .get() .javascript().mouse().mouseup(); waitUntilTrue("repo should be selected", elementFinder.find(By.cssSelector("ul.select2-choices li.select2-search-choice div")).timed().isVisible()); this.rootElement.find(By.className("addDvcsRepoButton")).click(); final PageElement row = reposTable.find(By.cssSelector("tr#dvcs-repo-row-" + repoNameId.getId())); waitUntilTrue("repo row should be added", row.timed().isVisible()); return pageBinder.bind(AccountRepository.class, row); }
public void activateDropDownIfPresent() { if (dropDownLinkId.isPresent()) { List<PageElement> elementList = elementFinder.findAll(By.id(dropDownLinkId.get())); if (elementList.size() > 0) { waitUntilTrue(elementList.get(0).timed().isVisible()); if (elementList.get(0).hasClass("aui-dropdown2-active") == false) { elementList.get(0).javascript().mouse().click(); } } } }
public void hover() { activateDropDownIfPresent(); webItem.javascript().mouse().mouseover(); }
public void deactivateDropDownIfPresent() { if (dropDownLinkId.isPresent()) { List<PageElement> elementList = elementFinder.findAll(By.id(dropDownLinkId.get())); if (elementList.size() > 0) { waitUntilTrue(elementList.get(0).timed().isVisible()); if (elementList.get(0).hasClass("aui-dropdown2-active")) { elementList.get(0).javascript().mouse().click(); } } } }
public void activateDropDownIfPresent() { if (dropDownLinkId.isPresent()) { List<PageElement> elementList = elementFinder.findAll(By.id(dropDownLinkId.get())); if (elementList.size() > 0) { waitUntilTrue(elementList.get(0).timed().isVisible()); if (elementList.get(0).hasClass("aui-dropdown2-active") == false) { elementList.get(0).javascript().mouse().click(); } } } }
public void click() { activateDropDownIfPresent(); webItem.javascript().mouse().click(); }
public void click() { activateDropDownIfPresent(); webItem.javascript().mouse().click(); }
public RemoteCloseDialogPage close() { WebElement containerDiv = driver.findElement(By.id(key)); // have to repeat as we can't get this from PageElement runInFrame(driver, containerDiv, () -> { PageElement element = elementFinder.find(By.id("dialog-close-button")); waitUntilTrue(element.timed().isVisible()); element.javascript().mouse().click(); return null; }); return this; }