-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving to options and using find_element
- Loading branch information
Showing
6 changed files
with
58 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
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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
from appium.webdriver.common.appiumby import AppiumBy | ||
|
||
|
||
def test_blank_credentials(android_rdc_driver): | ||
android_rdc_driver.find_element_by_accessibility_id("test-Username").send_keys("") | ||
android_rdc_driver.find_element_by_accessibility_id("test-Password").send_keys("") | ||
android_rdc_driver.find_element_by_accessibility_id("test-LOGIN").click() | ||
android_rdc_driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='test-Username').send_keys("") | ||
android_rdc_driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='test-Password').send_keys("") | ||
android_rdc_driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='test-LOGIN').click() | ||
|
||
assert android_rdc_driver.find_element_by_accessibility_id("test-Error message").is_displayed() | ||
assert android_rdc_driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='test-Error message').is_displayed() |
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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
from appium.webdriver.common.appiumby import AppiumBy | ||
|
||
|
||
def test_standard_user(android_rdc_driver): | ||
android_rdc_driver.find_element_by_accessibility_id("test-Username").send_keys("standard_user") | ||
android_rdc_driver.find_element_by_accessibility_id("test-Password").send_keys("secret_sauce") | ||
android_rdc_driver.find_element_by_accessibility_id("test-LOGIN").click() | ||
android_rdc_driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='test-Username').send_keys("standard_user") | ||
android_rdc_driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='test-Password').send_keys("secret_sauce") | ||
android_rdc_driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='test-LOGIN').click() | ||
|
||
assert android_rdc_driver.find_element_by_accessibility_id("test-PRODUCTS").is_displayed() | ||
assert android_rdc_driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='test-PRODUCTS').is_displayed() |
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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
from appium.webdriver.common.appiumby import AppiumBy | ||
|
||
|
||
def test_blank_credentials(ios_rdc_driver): | ||
ios_rdc_driver.find_element_by_accessibility_id("test-Username").send_keys("") | ||
ios_rdc_driver.find_element_by_accessibility_id("test-Password").send_keys("") | ||
ios_rdc_driver.find_element_by_accessibility_id("test-LOGIN").click() | ||
ios_rdc_driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='test-Username').send_keys("") | ||
ios_rdc_driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='test-Password').send_keys("") | ||
ios_rdc_driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='test-LOGIN').click() | ||
|
||
assert ios_rdc_driver.find_element_by_accessibility_id("test-Error message").is_displayed() | ||
assert ios_rdc_driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='test-Error message').is_displayed() |
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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
from appium.webdriver.common.appiumby import AppiumBy | ||
|
||
|
||
def test_standard_user(ios_rdc_driver): | ||
ios_rdc_driver.find_element_by_accessibility_id("test-Username").send_keys("standard_user") | ||
ios_rdc_driver.find_element_by_accessibility_id("test-Password").send_keys("secret_sauce") | ||
ios_rdc_driver.find_element_by_accessibility_id("test-LOGIN").click() | ||
ios_rdc_driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='test-Username').send_keys("standard_user") | ||
ios_rdc_driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='test-Password').send_keys("secret_sauce") | ||
ios_rdc_driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='test-LOGIN').click() | ||
|
||
assert ios_rdc_driver.find_element_by_accessibility_id("test-PRODUCTS").is_displayed() | ||
assert ios_rdc_driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='test-PRODUCTS').is_displayed() |