Search in sources :

Example 6 with HiddenHtmlElementState

use of com.axway.ats.uiengine.utilities.hiddenbrowser.HiddenHtmlElementState in project ats-framework by Axway.

the class HiddenHtmlCheckBox method check.

/**
     * Check the check box
     */
@Override
@PublicAtsApi
public void check() {
    new HiddenHtmlElementState(this).waitToBecomeExisting();
    HtmlUnitWebElement element = HiddenHtmlElementLocator.findElement(this);
    if (!element.isEnabled()) {
        throw new UnsupportedOperationException("You may not check a disabled element." + toString());
    }
    if (!element.isSelected()) {
        element.click();
    }
    UiEngineUtilities.sleep();
}
Also used : HiddenHtmlElementState(com.axway.ats.uiengine.utilities.hiddenbrowser.HiddenHtmlElementState) HtmlUnitWebElement(org.openqa.selenium.htmlunit.HtmlUnitWebElement) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 7 with HiddenHtmlElementState

use of com.axway.ats.uiengine.utilities.hiddenbrowser.HiddenHtmlElementState in project ats-framework by Axway.

the class HiddenHtmlFileBrowse method setValue.

/**
     * Set the File Select Button value
     *
     * @param value to set
     */
@Override
@PublicAtsApi
public void setValue(String value) {
    new HiddenHtmlElementState(this).waitToBecomeExisting();
    setFileInputValue(webDriver, value);
    UiEngineUtilities.sleep();
}
Also used : HiddenHtmlElementState(com.axway.ats.uiengine.utilities.hiddenbrowser.HiddenHtmlElementState) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 8 with HiddenHtmlElementState

use of com.axway.ats.uiengine.utilities.hiddenbrowser.HiddenHtmlElementState in project ats-framework by Axway.

the class HiddenHtmlElement method setTextContent.

/**
     * Set the content of the element
     * @param content the new content
     */
@PublicAtsApi
public void setTextContent(String content) {
    new HiddenHtmlElementState(this).waitToBecomeExisting();
    WebElement element = HiddenHtmlElementLocator.findElement(this);
    new Actions(htmlUnitDriver).sendKeys(element, content).perform();
}
Also used : HiddenHtmlElementState(com.axway.ats.uiengine.utilities.hiddenbrowser.HiddenHtmlElementState) Actions(org.openqa.selenium.interactions.Actions) WebElement(org.openqa.selenium.WebElement) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 9 with HiddenHtmlElementState

use of com.axway.ats.uiengine.utilities.hiddenbrowser.HiddenHtmlElementState in project ats-framework by Axway.

the class HiddenHtmlElement method rightClick.

/**
     * Simulate mouse right click action
     */
@Override
@PublicAtsApi
public void rightClick() {
    new HiddenHtmlElementState(this).waitToBecomeExisting();
    WebElement element = HiddenHtmlElementLocator.findElement(this);
    new Actions(htmlUnitDriver).contextClick(element).perform();
}
Also used : HiddenHtmlElementState(com.axway.ats.uiengine.utilities.hiddenbrowser.HiddenHtmlElementState) Actions(org.openqa.selenium.interactions.Actions) WebElement(org.openqa.selenium.WebElement) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 10 with HiddenHtmlElementState

use of com.axway.ats.uiengine.utilities.hiddenbrowser.HiddenHtmlElementState in project ats-framework by Axway.

the class HiddenHtmlElement method click.

/**
     * Simulate mouse click action
     */
@Override
@PublicAtsApi
public void click() {
    new HiddenHtmlElementState(this).waitToBecomeExisting();
    HiddenHtmlElementUtils.mouseClick(HiddenHtmlElementLocator.findElement(this));
}
Also used : HiddenHtmlElementState(com.axway.ats.uiengine.utilities.hiddenbrowser.HiddenHtmlElementState) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Aggregations

PublicAtsApi (com.axway.ats.common.PublicAtsApi)32 HiddenHtmlElementState (com.axway.ats.uiengine.utilities.hiddenbrowser.HiddenHtmlElementState)32 WebElement (org.openqa.selenium.WebElement)19 HtmlUnitWebElement (org.openqa.selenium.htmlunit.HtmlUnitWebElement)12 Actions (org.openqa.selenium.interactions.Actions)9 SeleniumOperationException (com.axway.ats.uiengine.exceptions.SeleniumOperationException)7 JavascriptExecutor (org.openqa.selenium.JavascriptExecutor)3 UiElementProperties (com.axway.ats.uiengine.elements.UiElementProperties)2 ArrayList (java.util.ArrayList)2 VerifyEqualityException (com.axway.ats.uiengine.exceptions.VerifyEqualityException)1 VerifyNotEqualityException (com.axway.ats.uiengine.exceptions.VerifyNotEqualityException)1 List (java.util.List)1 Action (org.openqa.selenium.interactions.Action)1