use of org.openqa.selenium.interactions.Actions in project charts by vaadin.
the class RangeSelectorCustomDateParserTBTest method setRangeValue.
private void setRangeValue(String value, WebElement input) {
Actions action = new Actions(driver);
// Should be done as one action, otherwise does not work
action.doubleClick(input).sendKeys(Keys.chord(Keys.CONTROL, "a")).sendKeys(Keys.BACK_SPACE).sendKeys(value).sendKeys(Keys.TAB).perform();
}
use of org.openqa.selenium.interactions.Actions in project charts by vaadin.
the class ColumnWithShapedTooltipTBTest method testCustomStuff.
@Override
protected void testCustomStuff() {
super.testCustomStuff();
WebElement findElement = driver.findElement(By.id("chart"));
Action move = new Actions(driver).moveToElement(findElement, 415, 280).build();
move.perform();
}
use of org.openqa.selenium.interactions.Actions in project charts by vaadin.
the class ServerSideEventsTBTest method setXAxesExtremes_occured_eventIsFired.
@Test
public void setXAxesExtremes_occured_eventIsFired() {
skipBrowser("Selecting area through Testbench does not work correctly", Browser.CHROME, Browser.PHANTOMJS);
openTestUI();
WebElement chart = driver.findElement(By.className("vaadin-chart"));
new Actions(driver).moveToElement(chart, 200, 100).click().clickAndHold().moveByOffset(50, 0).release().build().perform();
assertLastEventIsType(XAxesExtremesChangeEvent.class);
}
use of org.openqa.selenium.interactions.Actions in project ats-framework by Axway.
the class RealHtmlElement method doubleClick.
/**
* Simulate mouse double click action
*/
@Override
@PublicAtsApi
public void doubleClick() {
new RealHtmlElementState(this).waitToBecomeExisting();
WebElement element = RealHtmlElementLocator.findElement(this);
new Actions(webDriver).doubleClick(element).perform();
}
use of org.openqa.selenium.interactions.Actions in project ats-framework by Axway.
the class RealHtmlElement method mouseOver.
/**
* Simulate mouse over
*/
@Override
@PublicAtsApi
public void mouseOver() {
new RealHtmlElementState(this).waitToBecomeExisting();
WebElement element = RealHtmlElementLocator.findElement(this);
// 1. option
new Actions(webDriver).moveToElement(element).perform();
// 2. option
// element.sendKeys( "" );
// 3. option
// Mouse mouse = ( ( HasInputDevices ) webDriver ).getMouse();
// mouse.mouseMove( ( ( RemoteWebElement ) element ).getCoordinates() );
// 4. option
// String javaScript = "var evObj = document.createEvent('MouseEvents');"
// + "evObj.initMouseEvent(\"mouseover\",true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);"
// + "arguments[0].dispatchEvent(evObj);";
// JavascriptExecutor js = ( JavascriptExecutor ) webDriver;
// js.executeScript( javaScript, element );
UiEngineUtilities.sleep();
}
Aggregations