From dfab720f80369b7fd090e3dbd983e4ce01f66e24 Mon Sep 17 00:00:00 2001 From: Brandon Wolfe Date: Tue, 27 Jul 2021 15:23:00 -0500 Subject: [PATCH] test out ios tests as well --- docs/APILibraryDocumentation.html | 2 +- docs/DesktopLibraryDocumentation.html | 2 +- docs/GUILibraryDocumentation.html | 2 +- docs/MobileLibraryDocumentation.html | 2 +- docs/SOAPLibraryDocumentation.html | 2 +- test/Mobile/iOSMobileTests.robot | 73 +++++++++++++++++++++++++++ 6 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 test/Mobile/iOSMobileTests.robot diff --git a/docs/APILibraryDocumentation.html b/docs/APILibraryDocumentation.html index ae20c4ab..923e11dd 100644 --- a/docs/APILibraryDocumentation.html +++ b/docs/APILibraryDocumentation.html @@ -1101,7 +1101,7 @@ jQuery.extend({highlight:function(e,t,n,r){if(e.nodeType===3){var i=e.data.match(t);if(i){var s=document.createElement(n||"span");s.className=r||"highlight";var o=e.splitText(i.index);o.splitText(i[0].length);var u=o.cloneNode(true);s.appendChild(u);o.parentNode.replaceChild(s,o);return 1}}else if(e.nodeType===1&&e.childNodes&&!/(script|style)/i.test(e.tagName)&&!(e.tagName===n.toUpperCase()&&e.className===r)){for(var a=0;a diff --git a/docs/DesktopLibraryDocumentation.html b/docs/DesktopLibraryDocumentation.html index 4d8c76cf..179a7ad3 100644 --- a/docs/DesktopLibraryDocumentation.html +++ b/docs/DesktopLibraryDocumentation.html @@ -1101,7 +1101,7 @@ jQuery.extend({highlight:function(e,t,n,r){if(e.nodeType===3){var i=e.data.match(t);if(i){var s=document.createElement(n||"span");s.className=r||"highlight";var o=e.splitText(i.index);o.splitText(i[0].length);var u=o.cloneNode(true);s.appendChild(u);o.parentNode.replaceChild(s,o);return 1}}else if(e.nodeType===1&&e.childNodes&&!/(script|style)/i.test(e.tagName)&&!(e.tagName===n.toUpperCase()&&e.className===r)){for(var a=0;a diff --git a/docs/GUILibraryDocumentation.html b/docs/GUILibraryDocumentation.html index 1fd0c00e..75686feb 100644 --- a/docs/GUILibraryDocumentation.html +++ b/docs/GUILibraryDocumentation.html @@ -1101,7 +1101,7 @@ jQuery.extend({highlight:function(e,t,n,r){if(e.nodeType===3){var i=e.data.match(t);if(i){var s=document.createElement(n||"span");s.className=r||"highlight";var o=e.splitText(i.index);o.splitText(i[0].length);var u=o.cloneNode(true);s.appendChild(u);o.parentNode.replaceChild(s,o);return 1}}else if(e.nodeType===1&&e.childNodes&&!/(script|style)/i.test(e.tagName)&&!(e.tagName===n.toUpperCase()&&e.className===r)){for(var a=0;a diff --git a/docs/MobileLibraryDocumentation.html b/docs/MobileLibraryDocumentation.html index d467c8e6..3e9a4f98 100644 --- a/docs/MobileLibraryDocumentation.html +++ b/docs/MobileLibraryDocumentation.html @@ -1101,7 +1101,7 @@ jQuery.extend({highlight:function(e,t,n,r){if(e.nodeType===3){var i=e.data.match(t);if(i){var s=document.createElement(n||"span");s.className=r||"highlight";var o=e.splitText(i.index);o.splitText(i[0].length);var u=o.cloneNode(true);s.appendChild(u);o.parentNode.replaceChild(s,o);return 1}}else if(e.nodeType===1&&e.childNodes&&!/(script|style)/i.test(e.tagName)&&!(e.tagName===n.toUpperCase()&&e.className===r)){for(var a=0;a diff --git a/docs/SOAPLibraryDocumentation.html b/docs/SOAPLibraryDocumentation.html index 10420bd1..7090c3fc 100644 --- a/docs/SOAPLibraryDocumentation.html +++ b/docs/SOAPLibraryDocumentation.html @@ -1101,7 +1101,7 @@ jQuery.extend({highlight:function(e,t,n,r){if(e.nodeType===3){var i=e.data.match(t);if(i){var s=document.createElement(n||"span");s.className=r||"highlight";var o=e.splitText(i.index);o.splitText(i[0].length);var u=o.cloneNode(true);s.appendChild(u);o.parentNode.replaceChild(s,o);return 1}}else if(e.nodeType===1&&e.childNodes&&!/(script|style)/i.test(e.tagName)&&!(e.tagName===n.toUpperCase()&&e.className===r)){for(var a=0;a diff --git a/test/Mobile/iOSMobileTests.robot b/test/Mobile/iOSMobileTests.robot new file mode 100644 index 00000000..020fcca9 --- /dev/null +++ b/test/Mobile/iOSMobileTests.robot @@ -0,0 +1,73 @@ +*** Settings *** +Documentation Zoomba Mobile Library Tests. Requires Appium Server running on port 4723 with an Android device/emulator available. +Library Zoomba.MobileLibrary +Suite Setup Start App +Suite Teardown Close Application +Force Tags Mobile + +*** Variables *** +${REMOTE_URL} http://ondemand.us-west-1.saucelabs.com/wd/hub +${commandTimeout}= 120 + +*** Keywords *** +Start App + Open Application ${REMOTE_URL} platformName=iOS deviceName=iPhone XS Simulator + ... newCommandTimeout=${commandTimeout} browserName=Safari username=${sauce_username} + ... access_key=${sauce_key} platformVersion=14.5 name=GitHub.${SUITE_NAME} + ... build=${GITHUB_RUN_NUMBER} + Background App -1 + Switch To Context NATIVE_APP + +*** Test Cases *** +Wait For And Click Element By Id Keyword Test + Wait For And Click Element Contacts + Wait Until Page Contains Contacts + +Wait For And Click Element By Xpath Keyword Test + Background App -1 + Wait For And Click Element //XCUIElementTypeIcon[@name="Contacts"] + Wait Until Page Contains Contacts + +Wait For And Input Text/Password Keyword Test + Wait For And Input Text Search John + Wait Until Page Contains John Appleseed + Wait For And Click Element //XCUIElementTypeButton[@name="Cancel"] + Wait For And Input Password Search John + Wait Until Page Contains John Appleseed + Wait For And Click Element //XCUIElementTypeButton[@name="Cancel"] + +Wait For And Long Press Keyword Test + Wait For And Long Press //XCUIElementTypeCell[@name="John Appleseed"]/XCUIElementTypeOther[1]/XCUIElementTypeOther + Wait Until Page Contains Element message + Click A Point 10 100 + +Wait Until Element is Enabled Keyword Test + Wait Until Element Is Enabled Add + +#Drag and Drop Keyword Test #Need to come back to this after some edits for drag and drop +# Background App -1 +# Wait For And Long Press Files +# Wait For And Click Element OK +# Drag and Drop Files Watch +# Drag and Drop By Offset Shortcuts 200 200 +# Run keyword And Expect Error ValueError: Element locator 'Not_a_real_id' did not match any elements. +# ... Drag and Drop Not_a_real_id Watch +# Wait For And Click Element Done + +Wait Until Element Contains / Does Not Contain +# Wait For And Tap Contacts #Needed once we have the above test fixed + Wait For And Input Text Search John + Wait Until Element Contains Search John + Wait For And Click Element //XCUIElementTypeButton[@name="Cancel"] + Wait Until Element Does Not Contain Search John + +Scroll To Text Keyword Test + Go To Url https://www.appiumpro.com + Scroll Down To Text E-mail Address + Scroll Up To Text Let's face it + +Save Selenium Screenshot Test + ${file1}= Save Appium Screenshot + ${file2}= Save Appium Screenshot + Should Not Be Equal ${file1} ${file2} + Should Match Regexp ${file1} appium-screenshot-\\d{8,10}.\\d{6,8}-\\d.png