List of usage examples for org.openqa.selenium.interactions Actions perform
public void perform()
From source file:com.vaadin.tests.components.tree.TreeContextMenuAndIconsTest.java
License:Apache License
private WebElement openContextMenu(WebElement element) { Actions actions = new Actions(getDriver()); // Note: on Firefox, the first menu item does not get focus; on other // browsers it does actions.contextClick(element);/*from ww w . ja va2s . com*/ actions.perform(); return findElement(By.className("v-contextmenu")); }
From source file:com.vmware.gemfire.tools.pulse.tests.PulseAbstractTest.java
License:Apache License
protected void scrollbarVerticalDownScroll() { JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript("javascript:window.scrollBy(250,700)"); WebElement pickerScroll = driver.findElement(By.className("jspDrag")); WebElement pickerScrollCorner = driver.findElement(By.className("jspCorner")); Actions builder = new Actions(driver); Actions movePicker = builder.dragAndDrop(pickerScroll, pickerScrollCorner); // pickerscroll is the web element movePicker.perform(); }
From source file:com.vmware.gemfire.tools.pulse.tests.PulseAbstractTest.java
License:Apache License
protected void scrollbarHorizontalRightScroll() { JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript("javascript:window.scrollBy(250,700)"); WebElement pickerScroll = driver/*from w w w.j a va 2 s.c om*/ .findElement(By.xpath("//div[@id='gview_queryStatisticsList']/div[3]/div/div[3]/div[2]/div")); WebElement pickerScrollCorner = driver.findElement(By.className("jspCorner")); Actions builder = new Actions(driver); Actions movePicker = builder.dragAndDrop(pickerScroll, pickerScrollCorner); // pickerscroll is the web element movePicker.perform(); }
From source file:com.vmware.gemfire.tools.pulse.tests.PulseTest.java
License:Apache License
protected void scrollbarVerticalDownScroll() { JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript("javascript:window.scrollBy(250,700)"); WebElement pickerScroll = driver.findElement(By.className("jspDrag")); WebElement pickerScrollCorner = driver.findElement(By.className("jspCorner")); Actions builder = new Actions(driver); Actions movePicker = builder.dragAndDrop(pickerScroll, pickerScrollCorner); // pickerscroll // is // the // webelement movePicker.perform(); }
From source file:com.vmware.gemfire.tools.pulse.tests.PulseTest.java
License:Apache License
protected void scrollbarHorizontalRightScroll() { JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript("javascript:window.scrollBy(250,700)"); WebElement pickerScroll = driver/* ww w . j av a2 s . com*/ .findElement(By.xpath("//div[@id='gview_queryStatisticsList']/div[3]/div/div[3]/div[2]/div")); WebElement pickerScrollCorner = driver.findElement(By.className("jspCorner")); Actions builder = new Actions(driver); Actions movePicker = builder.dragAndDrop(pickerScroll, pickerScrollCorner); // pickerscroll // is // the // webelement movePicker.perform(); }
From source file:dk.dma.ais.abnormal.web.StatisticDataIT.java
License:Open Source License
private void clickOnACell() throws InterruptedException { zoomIntoHelsinore();/*from w ww . j a va 2 s .co m*/ waitForCellsToBeDisplayed(); WebElement map = getMap(); Actions actions = new Actions(browser); actions.moveToElement(map, map.getSize().getWidth() / 2, map.getSize().getHeight() / 2); actions.click(); actions.perform(); // Cursor position is exactly in the center of the map browser.findElement(By.id("tab-map")).click(); assertEquals("(5602'05.7\"N, 1238'59.7\"E)", browser.findElement(By.cssSelector("div#cursorpos.useroutput p")).getText()); // Assert statistic data for correct cell displayed final String expectedCellInfo = "Cell id 6249302540 (5602'06.5\"N,1238'53.8\"E) - (5602'00\"N,1239'00.3\"E)"; By actualCellInfoElement = By.cssSelector("div.cell-data-contents > h5"); wait.until(ExpectedConditions.textToBePresentInElement(actualCellInfoElement, expectedCellInfo)); }
From source file:edu.samplu.common.WebDriverLegacyITBase.java
License:Educational Community License
/** * {@link Actions#moveToElement(org.openqa.selenium.WebElement)} * @param by/*from w w w .ja v a 2 s . c o m*/ */ public void fireMouseOverEvent(By by) { Actions builder = new Actions(driver); Actions hover = builder.moveToElement(driver.findElement(by)); hover.perform(); }
From source file:gov.nih.nci.firebird.selenium2.pages.base.AbstractMenuPage.java
License:Open Source License
private void moveToMenuHeading(WebElement menuHeading) { Actions actions = new Actions(getDriver()); actions.moveToElement(menuHeading);/*from ww w . ja v a2 s .com*/ actions.perform(); }
From source file:org.alfresco.po.share.dashlet.AbstractDashlet.java
License:Open Source License
/** * This method is used to scroll down the current window. *///from w ww . j a v a 2s . c o m protected void scrollDownToDashlet() { ; Actions a = new Actions(driver); a.moveToElement(driver.findElement(resizeHandle)); a.perform(); }
From source file:org.alfresco.po.share.search.GalleryViewPopupPage.java
License:Open Source License
/** * Select close button.//from ww w . ja va 2s .co m * * @return {@link FacetedSearchPage} page response */ public HtmlPage selectClose() { closeButton = driver.findElement(GALLERY_VIEW_CLOSE_BUTTON); Actions a = new Actions(driver); a.moveToElement(closeButton); a.click(); a.perform(); return factoryPage.instantiatePage(driver, FacetedSearchPage.class); }