Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jeroen Zonneveld
committed
Jan 5, 2020
1 parent
e4c02b1
commit 0645d1e
Showing
6 changed files
with
89 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
*** Settings *** | ||
Library AppiumLibrary | ||
Library Collections | ||
|
||
** Variables ** | ||
|
||
${AUTOMATION_NAME_IOS} XCUITest | ||
${AUTOMATION_NAME_ANDROID} UiAutomator2 | ||
${APPLEDEVELOPERTEAMID} XXXXXXXXXXX | ||
|
||
# Device to run the test on | ||
${DEVICE} A50 | ||
${APPIUM_SERVER} http://0.0.0.0:4723/wd/hub | ||
${PLATFORM} ${${DEVICE}_PLATFORM} | ||
${VERSION} ${${DEVICE}_VERSION} | ||
${DEVICENAME} ${${DEVICE}_DEVICENAME} | ||
${UDID} ${${DEVICE}_UDID} | ||
${APPNAME} ${${DEVICE}_APPNAME} | ||
${AUTOMATION_NAME} ${${DEVICE}_AUTOMATION_NAME} | ||
|
||
#iPhone Xr | ||
${iPhoneXr_DEVICENAME} iPhoneXr | ||
${iPhoneXr_UDID} SET_UDID_HERE | ||
${iphoneXr_PLATFORM} iOS | ||
${iPhoneXr_VERSION} 13.3 | ||
${iPhoneXr_APPNAME} dev.zonneveld.exampleapp | ||
${iPhoneXr_AUTOMATION_NAME} ${AUTOMATION_NAME_IOS} | ||
|
||
#Galaxy A50 | ||
${A50_DEVICENAME} A50 | ||
${A50_UDID} SET_UDID_HERE | ||
${A50_PLATFORM} android | ||
${A50_VERSION} 9 | ||
${A50_APPNAME} apk/nameofyourapp.apk | ||
${A50_AUTOMATION_NAME} ${AUTOMATION_NAME_ANDROID} |
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,6 @@ | ||
*** Settings *** | ||
#Declaring all the resource files | ||
Resource ../settings.robot | ||
Resource ../testsuites/keywords/general_keywords.robot | ||
Resource ../testsuites/keywords/${TESTSUITE}_keywords.robot | ||
Resource ../testsuites/elements/${TESTSUITE}_elements.robot |
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,6 @@ | ||
*** Variables *** | ||
|
||
${LOGIN_BUTTON} xpath=//*[@resource-id='package.id:id/login_button' or @name="login_button"] | ||
${TEXTFIELD_USERNAME} xpath=//*[@resource-id='package.id:id/username_field' or @name="username_field"] | ||
${TEXTFIELD_PASSWORD} xpath=//*[@resource-id='package.id:id/password_field' or @name="password_field"] | ||
${LOGIN_BUTTON_SUBMIT} xpath=//*[@resource-id='package.id:id/login_button_submit' or @name="login_button_submit"] |
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,13 @@ | ||
# Keywords for the authentication test cases | ||
*** Keywords *** | ||
|
||
Setup and open app | ||
Open Application ${APPIUM_SERVER} udid=${UDID} platformName=${PLATFORM} | ||
... xcodeorgid=${APPLEDEVELOPERTEAMID} xcodesigningid=iPhone Developer automationName=${AUTOMATION_NAME} deviceName=${DEVICENAME} | ||
... app=${APPNAME} wdaStartupRetries=4 iosInstallPause=8000 wdaStartupRetryInterval=20000 maxTypingFrequency=3000 | ||
|
||
Close app | ||
Close Application | ||
|
||
Reset App | ||
Reset Application |
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,6 @@ | ||
# Keywords for the authentication test cases | ||
*** Keywords *** | ||
|
||
Go to login | ||
Wait Until Page Contains Element ${LOGIN_BUTTON} | ||
Tap ${LOGIN_BUTTON} |
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,23 @@ | ||
*** Variables *** | ||
${TESTSUITE} login | ||
|
||
*** Settings *** | ||
Resource ../settings/setup.robot | ||
|
||
#What to do on test/suite setup/teardown | ||
Suite Setup Setup and open app | ||
Suite Teardown Close App | ||
Test Setup Reset App | ||
|
||
*** Test Cases *** | ||
|
||
Validate invalid password | ||
Go to login | ||
|
||
Wait Until Page Contains Element ${TEXTFIELD_USERNAME} | ||
|
||
Input Text ${TEXTFIELD_USERNAME} j.zonneveld | ||
Input Text ${TEXTFIELD_PASSWORD} fakep@ssword99 | ||
|
||
Tap ${LOGIN_BUTTON_SUBMIT} | ||
|