Actions builder = new Actions(this.webDriver); WebElement element = this.getWebElement(); for (char c : value.toCharArray()) { builder = builder.sendKeys(element, c + ""); builder.pause(100); } builder.build().perform();
Actions actionobj = new Actions(fd1); actionobj.moveToElement(heatmap); actionobj.pause(10000); //wait 10 seconds actionobj.click(heatmap); actionobj.perform();
public InfoboxBuilderPage hoverMouseOverComponent(int index) { wait.forElementVisible(component.get(0)); builder.moveToElement(component.get(0)).pause(500).perform(); return this; }
@Override public LazyDomElement dragAndDropTo(String destinationSelector) { return executeActions("dragAndDropTo(" + destinationSelector + ")", (element, actions) -> actions .clickAndHold(element) .pause(100) .release(driver().findElementByCssSelector(destinationSelector))); }
@Override public LazyDomElement dragAndDropTo(String destinationSelector) { return executeActions("dragAndDropTo(" + destinationSelector + ")", (element, actions) -> actions .clickAndHold(element) .pause(100) .release(driver().findElementByCssSelector(destinationSelector))); }
@Override public void createPage(String template, String title, String name) { Actions actions = new Actions(webDriver); actions.pause(2000).perform(); createButton.click(); currentScope .findElement(By.className("cq-siteadmin-admin-create" + StringUtils.lowerCase("page"))) .click(); createPageWizard.selectTemplate(template).provideTitle(title).provideName(name).submit(); } }
public void clickOnPlayer() { builder.moveToElement(playButton) .pause(1000) .moveToElement(playButton, 150, 350) .click() .perform(); } }
public void clickVolumeButton() { builder.moveToElement(driver.findElement(PLAYER_SELECTOR)) .pause(1000) .moveToElement(volumeButton, 30, 30) .click() .perform(); }
/** * Performs the drag and drop: * <ul> * <li>switches to the frame that contains source element, * <li>grabs the source element by clicking on it, * <li>slowly moves towards the drop area, * <li>release the mouse button when reaches the center of the drop area. * </ul> */ @Override public void dropByOffset(int x, int y) { switcher.switchTo(getFramePath()); try { actions.clickAndHold(webElement).perform(); performMovement(x, Orientantion.HORIZONTAL, actions); performMovement(y, Orientantion.VERTICAL, actions); actions.pause(Timeouts.MINIMAL).release().perform(); } finally { switcher.switchBack(); } }
/** * Performs the drag and drop: * <ul> * <li>switches to the frame that contains source element, * <li>grabs the source element by clicking on it, * <li>slowly moves towards the drop area, * <li>release the mouse button when reaches the center of the drop area. * </ul> */ @Override public void dropByOffset(int x, int y) { switcher.switchTo(getFramePath()); try { actions.clickAndHold(webElement).perform(); performMovement(x, Orientantion.HORIZONTAL, actions); performMovement(y, Orientantion.VERTICAL, actions); actions.pause(Timeouts.MINIMAL).release().perform(); } finally { switcher.switchBack(); } }