use of com.axway.ats.uiengine.utilities.realbrowser.html.RealHtmlElementState 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();
}
use of com.axway.ats.uiengine.utilities.realbrowser.html.RealHtmlElementState in project ats-framework by Axway.
the class RealHtmlTextArea method getValue.
/**
* Get the Text Area value
* @return
*/
@Override
@PublicAtsApi
public String getValue() {
new RealHtmlElementState(this).waitToBecomeExisting();
WebElement element = RealHtmlElementLocator.findElement(this);
return normalizeText(element.getAttribute("value"));
}
use of com.axway.ats.uiengine.utilities.realbrowser.html.RealHtmlElementState in project ats-framework by Axway.
the class RealHtmlTextArea method setValue.
/**
* Set the Text Area value
*
* @param value
*/
@Override
@PublicAtsApi
public void setValue(String value) {
new RealHtmlElementState(this).waitToBecomeExisting();
WebElement element = RealHtmlElementLocator.findElement(this);
element.clear();
element.sendKeys(normalizeText(value));
UiEngineUtilities.sleep();
}
use of com.axway.ats.uiengine.utilities.realbrowser.html.RealHtmlElementState in project ats-framework by Axway.
the class RealHtmlTextBox method setValue.
/**
* Set the Text Box value
*
* @param value
*/
@Override
@PublicAtsApi
public void setValue(String value) {
new RealHtmlElementState(this).waitToBecomeExisting();
WebElement element = RealHtmlElementLocator.findElement(this);
element.clear();
element.sendKeys(value);
UiEngineUtilities.sleep();
}
Aggregations