-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update steps for appium 1.9.0 and java-client 6.1.0 (#50)
* add systemPort for android parallel testing * make boolean checkElementExist public for using in other steps * add driversSettings to additionalAndroidCapabilities for using systemPort * add checkTextCaseInsensitive method * change checkTextCaseInsensitive method * rename strings with ABC * remove jitpack * change string name * add comment to translate xpath * add comment to translate xpath * fix input text steps * change and add new ios steps * change android buttons * refactor sendKeys method * remove log annotation
- Loading branch information
1 parent
4fd34ac
commit 2ab4e28
Showing
10 changed files
with
118 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/java/ru/colibri/ui/steps/android/AndroidTextFieldSteps.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package ru.colibri.ui.steps.android; | ||
|
||
import org.jbehave.core.annotations.Named; | ||
import org.jbehave.core.annotations.When; | ||
import org.openqa.selenium.By; | ||
import org.springframework.stereotype.Component; | ||
import ru.colibri.ui.steps.general.TextFieldSteps; | ||
import ru.yandex.qatools.allure.annotations.Step; | ||
|
||
@Component | ||
public class AndroidTextFieldSteps extends TextFieldSteps { | ||
|
||
private static final By editTextLocator = By.xpath("//*[contains(@class,'EditText')]"); | ||
|
||
@Step | ||
@When("ввод текста с клавиатуры \"$textOrKeyword\"") | ||
public void sendKeyboardText(@Named("$textOrKeyword") String textOrKeyword) { | ||
sendText(textOrKeyword, editTextLocator); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/ru/colibri/ui/steps/ios/IOSTextFieldSteps.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package ru.colibri.ui.steps.ios; | ||
|
||
import io.appium.java_client.MobileBy; | ||
import org.jbehave.core.annotations.Named; | ||
import org.jbehave.core.annotations.When; | ||
import org.openqa.selenium.By; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Component; | ||
import ru.colibri.ui.settings.general.PropertyUtils; | ||
import ru.colibri.ui.steps.general.TextFieldSteps; | ||
import ru.yandex.qatools.allure.annotations.Step; | ||
|
||
@Component | ||
public class IOSTextFieldSteps extends TextFieldSteps { | ||
|
||
private static final By editTextLocator = MobileBy.iOSNsPredicateString("type like 'XCUIElementTypeTextField'"); | ||
|
||
@Autowired | ||
private PropertyUtils propertyUtils; | ||
|
||
@Step | ||
@When("ввод текста с клавиатуры \"$textOrKeyword\"") | ||
public void sendKeyboardText(@Named("$textOrKeyword") String textOrKeyword) { | ||
sendText(textOrKeyword, editTextLocator); | ||
} | ||
} |