Class MobileGSpec


  • public class MobileGSpec
    extends BaseGSpec
    Step definition for Appium (mobile testing).

    This class contains the functionality that is only available in the MobileDriver. most of the steps definitions for selenium ( in SeleniumGSpec) can be used for mobile testing Cast the instance of WebDriver to MobileDriver to access the specific functions for mobile (take the existing functions as reference)

    Author:
    José Fernandez
    • Constructor Detail

      • MobileGSpec

        public MobileGSpec​(CommonG spec)
        Generic constructor.
        Parameters:
        spec - object
    • Method Detail

      • iOpenTheApplication

        @Given("^I open the application$")
        public void iOpenTheApplication()
        Launches the app, which was provided in the capabilities at session creation, and (re)starts the session.
      • iCloseTheApplication

        @Given("^I close the application$")
        public void iCloseTheApplication()
        Close the app which was provided in the capabilities at session creation and quits the session.
      • iRotateTheDeviceToLandscapeMode

        @Given("^I rotate the device to \'(landscape|portrait)\' mode$")
        public void iRotateTheDeviceToLandscapeMode​(String orientation)
                                             throws Throwable
        Changes the device orientation
        Parameters:
        orientation - Device orientation (portrait/landscape)
        Throws:
        Throwable - Throwable