Package com.privalia.qa.specs
Class MobileGSpec
- java.lang.Object
-
- com.privalia.qa.specs.BaseGSpec
-
- com.privalia.qa.specs.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 ( inSeleniumGSpec
) can be used for mobile testing Cast the instance ofWebDriver
toMobileDriver
to access the specific functions for mobile (take the existing functions as reference)- Author:
- José Fernandez
-
-
Field Summary
-
Fields inherited from class com.privalia.qa.specs.BaseGSpec
commonspec
-
-
Constructor Summary
Constructors Constructor Description MobileGSpec(CommonG spec)
Generic constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
iCloseTheApplication()
Close the app which was provided in the capabilities at session creation and quits the session.void
iOpenTheApplication()
Launches the app, which was provided in the capabilities at session creation, and (re)starts the session.void
iRotateTheDeviceToLandscapeMode(String orientation)
Changes the device orientation-
Methods inherited from class com.privalia.qa.specs.BaseGSpec
getCommonSpec
-
-
-
-
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
-
-