All Downloads are FREE. Search and download functionalities are using the official Maven repository.

automated.platforms.mobile.ios.IOSActions Maven / Gradle / Ivy

The newest version!
package automated.platforms.mobile.ios;

import io.appium.java_client.TouchAction;
import io.appium.java_client.ios.IOSDriver;
import automated.reporting.TestReporter;
import automated.test_manage.config.Platform;
import automated.reporting.TestReporter;
import automated.test_manage.config.Platform;

/**
 * Created by Ismail on 1/5/2018.
 * This Class contains all related methods and their implementation
 * for iOS application actions
 */
public class IOSActions {

    /*************** Class Methods Section ***************/
    // This method to do Pull to Refresh action
    public static void pullToRefresh() {
        try {// Call TouchAction for iOS Driver object then press screen
            // with do moving down on the screen
            new TouchAction((IOSDriver) Platform.driver).press(170, 400)
                    .moveTo(170, 980).release().perform();
            // If screen Refresh success report step as passed
            TestReporter.pass("Screen Refresh successful");
        } catch (Throwable throwable) {
            TestReporter.fail("Unable to pullToRefresh screen, Please check" + "error log: " + throwable.getMessage(), true);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy