Class AndroidSteps

    • Constructor Detail

      • AndroidSteps

        public AndroidSteps​(TestContext testContext)
    • Method Detail

      • i_set_ios_phone

        @When("^I set up Android phone (.+) and UDID (.+)$")
        public void i_set_ios_phone​(java.lang.String androidPhoneName,
                                    java.lang.String androidUDID)
                             throws java.lang.Exception
        The method will set Android device name and UDID
        Parameters:
        androidPhoneName - e.g Nexus 6, Samsung Glaxy and androidUDID e.g emulator-5554
        Throws:
        java.lang.Exception
      • i_open_android_app

        @When("^I open android app (.+)$")
        public void i_open_android_app​(java.lang.String appName)
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_open_android_app_no_reset

        @When("^Android - I open android app (.+) without reset$")
        public void i_open_android_app_no_reset​(java.lang.String appName)
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_click_Android_App_field_with_xpath

        @When("^I click android app element (.+)$")
        public void i_click_Android_App_field_with_xpath​(java.lang.String locatorPath)
                                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_click_android_text

        @When("^I click on android app text (.+)$")
        public void i_click_android_text​(java.lang.String text)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_fill_Android_App_field_with_input_label

        @When("^I fill android app input with label (.+) with value (.+)$")
        public void i_fill_Android_App_field_with_input_label​(java.lang.String label,
                                                              java.lang.String value)
                                                       throws java.lang.Exception
        The method will search for the element with xpath generated by label name and will fill the value.Use this for password fields
        Parameters:
        label -
        value -
        Throws:
        java.lang.Exception
      • i_fill_Android_App_field_with_xpath

        @When("^I fill android app input element (.+) with value (.+)$")
        public void i_fill_Android_App_field_with_xpath​(java.lang.String locatorPath,
                                                        java.lang.String value)
                                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_open_iOS_app_browser

        @When("^AndroidWeb - I open web browser in Android Phone the app (.+)$")
        public void i_open_iOS_app_browser​(java.lang.String appName)
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_accept_android_alert

        @When("^I accept the android alert with name (.+)$")
        public void i_accept_android_alert​(java.lang.String fieldName)
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_fill_Android_App_filed

        @When("^I fill android app input field with name (.+) and with id (.+) and value (.+)$")
        public void i_fill_Android_App_filed​(java.lang.String fieldName,
                                             java.lang.String fieldId,
                                             java.lang.String value)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • send_keys_android

        @When("^Android - I send keys to element (.+) with value (.+)$")
        public void send_keys_android​(java.lang.String locatorPath,
                                      java.lang.String value)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_select_address

        @When("^I select first address from the list$")
        public void i_select_address()
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_accept_confirm_alert

        @When("^I accept confirm alert$")
        public void i_accept_confirm_alert()
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_login_into_facebook

        @When("^I login into facebook using username (.+) and password (.+)$")
        public void i_login_into_facebook​(java.lang.String username,
                                          java.lang.String password)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • scroll_end

        @When("^Android - I scroll to end of page$")
        public void scroll_end()
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • scroll_top

        @When("^Android - I scroll to top of page$")
        public void scroll_top()
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • press_back_button

        @When("^Android - I press back button$")
        public void press_back_button()
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • scroll_locator

        @When("^Android - I scroll to element (.+)$")
        public void scroll_locator​(java.lang.String locatorPath)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • scroll_forward

        @When("^Android - I scroll forward$")
        public void scroll_forward()
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • hide_keyboard

        @When("^Android - I hide keyboard$")
        public void hide_keyboard()
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • android_can_see_text

        @When("^Android - I can see text (.+)$")
        public void android_can_see_text​(java.lang.String text)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • android_close_app

        @When("^Android - I close app$")
        public void android_close_app()
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_can_see_text_contains

        @When("^Android - I can see contains text (.+)$")
        public void i_can_see_text_contains​(java.lang.String text)
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • android_open_app

        @When("^Android - I open app (.+)$")
        public void android_open_app​(java.lang.String text)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_click_iOS_App_Button_with_AccessibilityId

        @When("^I click android app button with name (.+) and with accessibility id (.+)$")
        public void i_click_iOS_App_Button_with_AccessibilityId​(java.lang.String fieldName,
                                                                java.lang.String accessibilityId)
                                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_click_android_back

        @When("^Android - I click on back button on device$")
        public void i_click_android_back()
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • accept_android_alert

        @When("^I accept android alert$")
        public void accept_android_alert​(java.lang.String fieldName,
                                         java.lang.String accessibilityId)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • android_press_enter_key

        @When("^I press android enter key$")
        public void android_press_enter_key()
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • android_rotate_landscape

        @When("^Android - I rotate screen to landscape$")
        public void android_rotate_landscape()
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • android_rotate_portrait

        @When("^Android - I rotate screen to portrait$")
        public void android_rotate_portrait()
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • tearDown1

        public void tearDown1()