Search in sources :

Example 51 with Actions

use of org.openqa.selenium.interactions.Actions in project charts by vaadin.

the class AbstractPointClickCoordinatesTest method clickPoint.

protected void clickPoint() {
    VerticalLayoutElement layout = $(VerticalLayoutElement.class).first();
    new Actions(driver).moveToElement(layout, expectedPointX, expectedPointY).click().build().perform();
    waitForVaadin();
}
Also used : Actions(org.openqa.selenium.interactions.Actions) VerticalLayoutElement(com.vaadin.testbench.elements.VerticalLayoutElement)

Example 52 with Actions

use of org.openqa.selenium.interactions.Actions in project charts by vaadin.

the class AbstractPointClickCoordinatesTest method clickChart.

private void clickChart() {
    WebElement chart = findElement(By.className("vaadin-chart"));
    new Actions(driver).moveToElement(chart, expectedChartX, expectedChartY).click().build().perform();
    waitForVaadin();
}
Also used : Actions(org.openqa.selenium.interactions.Actions) WebElement(org.openqa.selenium.WebElement)

Example 53 with Actions

use of org.openqa.selenium.interactions.Actions in project charts by vaadin.

the class MasterDetailTBTest method test.

@Test
public void test() throws IOException, AssertionError {
    driver.get(getTestUrl());
    waitForVaadin();
    captureAndCompare("before");
    WebElement findElement = driver.findElement(By.id("master-chart"));
    Action click = new Actions(driver).moveToElement(findElement, 150, 40).clickAndHold().moveByOffset(100, 0).release().build();
    click.perform();
    waitForVaadin();
    captureAndCompare("after");
}
Also used : Action(org.openqa.selenium.interactions.Action) Actions(org.openqa.selenium.interactions.Actions) WebElement(org.openqa.selenium.WebElement) Test(org.junit.Test)

Example 54 with Actions

use of org.openqa.selenium.interactions.Actions in project charts by vaadin.

the class MultipleAxesWithResetZoomTBTest method zoomChart.

private void zoomChart() {
    List<WebElement> points = driver.findElements(By.cssSelector(".highcharts-series  > rect"));
    Actions builder = new Actions(driver);
    Action dragAndDrop = builder.clickAndHold(points.get(3)).moveToElement(points.get(9)).release(points.get(9)).build();
    dragAndDrop.perform();
}
Also used : Action(org.openqa.selenium.interactions.Action) Actions(org.openqa.selenium.interactions.Actions) WebElement(org.openqa.selenium.WebElement)

Example 55 with Actions

use of org.openqa.selenium.interactions.Actions in project charts by vaadin.

the class PieChartTBTest method testCustomStuff.

@Override
protected void testCustomStuff() {
    super.testCustomStuff();
    // Ensure animation has finished before clicking
    waitForVaadin();
    WebElement firstSeriesPoint = driver.findElement(By.cssSelector(".highcharts-series > path"));
    Action click = new Actions(driver).moveToElement(firstSeriesPoint).click().build();
    click.perform();
    waitForVaadin();
    boolean containsFirefox = driver.findElement(By.className("v-Notification")).getText().contains("Firefox");
    Assert.assertTrue(containsFirefox);
}
Also used : Action(org.openqa.selenium.interactions.Action) Actions(org.openqa.selenium.interactions.Actions) WebElement(org.openqa.selenium.WebElement)

Aggregations

Actions (org.openqa.selenium.interactions.Actions)116 WebElement (org.openqa.selenium.WebElement)72 WebDriver (org.openqa.selenium.WebDriver)26 Test (org.junit.Test)21 FirefoxDriver (org.openqa.selenium.firefox.FirefoxDriver)18 PublicAtsApi (com.axway.ats.common.PublicAtsApi)16 Action (org.openqa.selenium.interactions.Action)10 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 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 VerticalLayoutElement (com.vaadin.testbench.elements.VerticalLayoutElement)1