Search in sources :

Example 36 with Actions

use of org.openqa.selenium.interactions.Actions in project ORCID-Source by ORCID.

the class BBBUtil method ngAwareClick.

public static void ngAwareClick(WebElement webElement, WebDriver webDriver) {
    waitForAngular(webDriver);
    Actions actions = new Actions(webDriver);
    actions.moveToElement(webElement).perform();
    actions.click(webElement).perform();
    waitForAngular(webDriver);
}
Also used : Actions(org.openqa.selenium.interactions.Actions)

Example 37 with Actions

use of org.openqa.selenium.interactions.Actions in project geode by apache.

the class PulseBase method testDataViewTreeMapPopUpData.

@Test
public void testDataViewTreeMapPopUpData() {
    searchByLinkAndClick(CLUSTER_VIEW_LABEL);
    searchByLinkAndClick(DATA_DROPDOWN_ID);
    WebElement TreeMapMember = getWebDriver().findElement(By.id("GraphTreeMapClusterData-canvas"));
    Actions builder = new Actions(getWebDriver());
    builder.clickAndHold(TreeMapMember).perform();
    String RegionType = getWebDriver().findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div/div[2]/div")).getText();
    String regionType = JMXProperties.getInstance().getProperty("region.R2.regionType");
    assertEquals(regionType, RegionType);
    String EntryCount = getWebDriver().findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[2]/div[2]/div")).getText();
    String entryCount = JMXProperties.getInstance().getProperty("region.R2.systemRegionEntryCount");
    assertEquals(entryCount, EntryCount);
    String EntrySizetemp = getWebDriver().findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[3]/div[2]/div")).getText();
    float EntrySize = Float.parseFloat(EntrySizetemp);
    float entrySize = Float.parseFloat(JMXProperties.getInstance().getProperty("region.R2.entrySize"));
    entrySize = entrySize / 1024 / 1024;
    entrySize = Float.parseFloat(new DecimalFormat("##.####").format(entrySize));
    assertEquals(entrySize, EntrySize, 0.001);
    builder.moveToElement(TreeMapMember).release().perform();
}
Also used : Actions(org.openqa.selenium.interactions.Actions) DecimalFormat(java.text.DecimalFormat) WebElement(org.openqa.selenium.WebElement) Test(org.junit.Test)

Example 38 with Actions

use of org.openqa.selenium.interactions.Actions in project geode by apache.

the class PulseTestUtils method mouseReleaseById.

public static void mouseReleaseById(String id) {
    verifyElementPresentById(id);
    Actions action = new Actions(getDriver());
    WebElement we = getDriver().findElement(By.id(id));
    action.moveToElement(we).release().perform();
}
Also used : Actions(org.openqa.selenium.interactions.Actions) WebElement(org.openqa.selenium.WebElement)

Example 39 with Actions

use of org.openqa.selenium.interactions.Actions in project java.webdriver by sayems.

the class Action method pageDown.

public void pageDown() {
    Actions clicker = new Actions(driver);
    clicker.sendKeys(Keys.PAGE_DOWN);
}
Also used : Actions(org.openqa.selenium.interactions.Actions)

Example 40 with Actions

use of org.openqa.selenium.interactions.Actions in project java.webdriver by sayems.

the class Action method pressShiftAndTab.

// Method to press shift + tab
public void pressShiftAndTab() {
    Actions action = new Actions(driver);
    action.sendKeys(Keys.chord(Keys.SHIFT), Keys.chord(Keys.TAB)).build().perform();
}
Also used : Actions(org.openqa.selenium.interactions.Actions)

Aggregations

Actions (org.openqa.selenium.interactions.Actions)100 WebElement (org.openqa.selenium.WebElement)59 WebDriver (org.openqa.selenium.WebDriver)26 FirefoxDriver (org.openqa.selenium.firefox.FirefoxDriver)18 PublicAtsApi (com.axway.ats.common.PublicAtsApi)16 Test (org.junit.Test)16 HiddenHtmlElementState (com.axway.ats.uiengine.utilities.hiddenbrowser.HiddenHtmlElementState)9 WebDriverWait (org.openqa.selenium.support.ui.WebDriverWait)6 RealHtmlElementState (com.axway.ats.uiengine.utilities.realbrowser.html.RealHtmlElementState)4 List (java.util.List)3 Action (org.openqa.selenium.interactions.Action)3 MobileOperationException (com.axway.ats.uiengine.exceptions.MobileOperationException)2 VerificationException (com.axway.ats.uiengine.exceptions.VerificationException)2 MobileElementState (com.axway.ats.uiengine.utilities.mobile.MobileElementState)2 AndroidDriver (io.appium.java_client.android.AndroidDriver)2 File (java.io.File)2 DecimalFormat (java.text.DecimalFormat)2 JavascriptExecutor (org.openqa.selenium.JavascriptExecutor)2 SystemException (com.github.bordertech.wcomponents.util.SystemException)1 JavascriptActions (com.wikia.webdriver.common.core.elemnt.JavascriptActions)1