Search in sources :

Example 66 with PublicAtsApi

use of com.axway.ats.common.PublicAtsApi in project ats-framework by Axway.

the class SwingPopupMenu method click.

/**
     * Click pop-up element
     * @throws VerificationException if the element doesn't exist
     */
@PublicAtsApi
public void click() {
    new SwingElementState(this).waitToBecomeExisting();
    ((JPopupMenuFixture) SwingElementLocator.findFixture(this)).click();
}
Also used : JPopupMenuFixture(org.fest.swing.fixture.JPopupMenuFixture) SwingElementState(com.axway.ats.uiengine.utilities.swing.SwingElementState) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 67 with PublicAtsApi

use of com.axway.ats.common.PublicAtsApi in project ats-framework by Axway.

the class RealHtmlTextBox method appendValue.

/**
     * Append text to the current content of a Text Box
     * 
     * @param value
     */
@PublicAtsApi
public void appendValue(String value) {
    new RealHtmlElementState(this).waitToBecomeExisting();
    WebElement element = RealHtmlElementLocator.findElement(this);
    element.sendKeys(value);
    UiEngineUtilities.sleep();
}
Also used : RealHtmlElementState(com.axway.ats.uiengine.utilities.realbrowser.html.RealHtmlElementState) WebElement(org.openqa.selenium.WebElement) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 68 with PublicAtsApi

use of com.axway.ats.common.PublicAtsApi in project ats-framework by Axway.

the class MobileCheckBox method unCheck.

/**
     * Uncheck the check box
     */
@Override
@PublicAtsApi
public void unCheck() {
    new MobileElementState(this).waitToBecomeExisting();
    try {
        WebElement checkboxElement = MobileElementFinder.findElement(appiumDriver, this);
        if (checkboxElement.isSelected()) {
            if (appiumDriver instanceof AndroidDriver) {
                // checkboxElement.click(); // throwing exception (on Android) with message: Element is not clickable at point (x,y). Other element would receive the click
                new Actions(appiumDriver).moveToElement(checkboxElement).click().perform();
            } else {
                checkboxElement.click();
            }
        }
    } catch (Exception se) {
        throw new MobileOperationException(this, "unCheck", se);
    }
    UiEngineUtilities.sleep();
}
Also used : Actions(org.openqa.selenium.interactions.Actions) MobileOperationException(com.axway.ats.uiengine.exceptions.MobileOperationException) AndroidDriver(io.appium.java_client.android.AndroidDriver) WebElement(org.openqa.selenium.WebElement) MobileOperationException(com.axway.ats.uiengine.exceptions.MobileOperationException) VerificationException(com.axway.ats.uiengine.exceptions.VerificationException) MobileElementState(com.axway.ats.uiengine.utilities.mobile.MobileElementState) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 69 with PublicAtsApi

use of com.axway.ats.common.PublicAtsApi in project ats-framework by Axway.

the class SwingPopupMenu method clickMenuItemByName.

/**
     * Click {@link MenuItem} pop-up element by its 'name' attribute value
     *
     * @param menuItemName {@link MenuItem} name attribute value
     */
@PublicAtsApi
public void clickMenuItemByName(String menuItemName) {
    new SwingElementState(this).waitToBecomeExisting();
    ((JPopupMenuFixture) SwingElementLocator.findFixture(this)).menuItem(menuItemName).click();
}
Also used : SwingElementState(com.axway.ats.uiengine.utilities.swing.SwingElementState) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 70 with PublicAtsApi

use of com.axway.ats.common.PublicAtsApi in project ats-framework by Axway.

the class SwingRadioButton method select.

/**
     * Select radio button
     *
     * @throws VerificationException if the element doesn't exist
     */
@PublicAtsApi
public void select() {
    new SwingElementState(this).waitToBecomeExisting();
    ((JRadioButtonFixture) SwingElementLocator.findFixture(this)).check();
}
Also used : SwingElementState(com.axway.ats.uiengine.utilities.swing.SwingElementState) JRadioButtonFixture(org.fest.swing.fixture.JRadioButtonFixture) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Aggregations

PublicAtsApi (com.axway.ats.common.PublicAtsApi)409 Validator (com.axway.ats.core.validation.Validator)66 SwingElementState (com.axway.ats.uiengine.utilities.swing.SwingElementState)60 WebElement (org.openqa.selenium.WebElement)57 IFileSystemOperations (com.axway.ats.core.filesystem.model.IFileSystemOperations)44 HiddenHtmlElementState (com.axway.ats.uiengine.utilities.hiddenbrowser.HiddenHtmlElementState)32 NoSuchMimePackageException (com.axway.ats.action.objects.model.NoSuchMimePackageException)31 PackageException (com.axway.ats.action.objects.model.PackageException)31 RealHtmlElementState (com.axway.ats.uiengine.utilities.realbrowser.html.RealHtmlElementState)31 MessagingException (javax.mail.MessagingException)31 VerificationException (com.axway.ats.uiengine.exceptions.VerificationException)24 ArrayList (java.util.ArrayList)18 SeleniumOperationException (com.axway.ats.uiengine.exceptions.SeleniumOperationException)16 UiElementException (com.axway.ats.uiengine.exceptions.UiElementException)16 IOException (java.io.IOException)16 JTableFixture (org.fest.swing.fixture.JTableFixture)16 Actions (org.openqa.selenium.interactions.Actions)16 NotSupportedOperationException (com.axway.ats.uiengine.exceptions.NotSupportedOperationException)15 VerifyNotEqualityException (com.axway.ats.uiengine.exceptions.VerifyNotEqualityException)15 XMLException (com.axway.ats.common.xml.XMLException)14