Skip to content

Commit

Permalink
Merge 83d81ed into 8dcd90c
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfe1 committed Jul 23, 2021
2 parents 8dcd90c + 83d81ed commit e30e52f
Show file tree
Hide file tree
Showing 13 changed files with 336 additions and 25 deletions.
40 changes: 38 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,42 @@ on:
branches:
- master
jobs:
upload-demo-apps:
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v2
- shell: bash
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
working-directory: test/Helpers
working-directory: ${{env.working-directory}}
run: |
curl -F "payload=@./demo_app.apk" -F name=demo_app.apk -u "$SAUCE_USERNAME":"$SAUCE_ACCESS_KEY" "https://api.us-west-1.saucelabs.com/v1/storage/upload"
run-tests-edge:
runs-on: windows-latest
strategy:
matrix:
python-version: [ 3.6, 3.7, 3.8, 3.9 ]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip robotframework-pabot
pip install .
- uses: browser-actions/setup-edge@latest
- name: Run Edge Robot Tests
run: |
${{ matrix.set_display }}
robot --randomize suites -i Edge -v sauce_username:${{ secrets.SAUCE_USERNAME }} -v sauce_key:${{ secrets.SAUCE_ACCESS_KEY }} -v GITHUB_RUN_NUMBER:Github.Zoomba.$GITHUB_RUN_NUMBER test
run-tests:
runs-on: ubuntu-latest
strategy:
Expand All @@ -24,7 +60,7 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pip robotframework-pabot
pip install .
pip install coveralls mock pytest-cov
sudo apt-get update
Expand All @@ -37,7 +73,7 @@ jobs:
- name: Run Robot Tests
run: |
${{ matrix.set_display }}
robot -e BrokenORWindowsORMobile test
pabot --randomize suites -e BrokenORWindowsOREdge -v sauce_username:${{ secrets.SAUCE_USERNAME }} -v sauce_key:${{ secrets.SAUCE_ACCESS_KEY }} -v GITHUB_RUN_NUMBER:Github.Zoomba.$GITHUB_RUN_NUMBER test
- name: Coveralls
env:
Expand Down
2 changes: 1 addition & 1 deletion docs/APILibraryDocumentation.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/DesktopLibraryDocumentation.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/GUILibraryDocumentation.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/MobileLibraryDocumentation.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/SOAPLibraryDocumentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -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<e.childNodes.length;a++){a+=jQuery.highlight(e.childNodes[a],t,n,r)}}return 0}});jQuery.fn.unhighlight=function(e){var t={className:"highlight",element:"span"};jQuery.extend(t,e);return this.find(t.element+"."+t.className).each(function(){var e=this.parentNode;e.replaceChild(this.firstChild,this);e.normalize()}).end()};jQuery.fn.highlight=function(e,t){var n={className:"highlight",element:"span",caseSensitive:false,wordsOnly:false};jQuery.extend(n,t);if(e.constructor===String){e=[e]}e=jQuery.grep(e,function(e,t){return e!=""});e=jQuery.map(e,function(e,t){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")});if(e.length==0){return this}var r=n.caseSensitive?"":"i";var i="("+e.join("|")+")";if(n.wordsOnly){i="\\b"+i+"\\b"}var s=new RegExp(i,r);return this.each(function(){jQuery.highlight(this,s,n.element,n.className)})}
</script>
<script type="text/javascript">
libdoc = {"name": "SOAP_Library", "doc": "<p>Zoomba SOAP Library</p>\n<p>This class is the base Library used to generate automated SOAP Tests in the Zoomba Automation Framework.</p>", "version": "2.11.2", "generated": "2021-07-09 12:34:58", "type": "LIBRARY", "scope": "TEST", "docFormat": "HTML", "source": "C:\\Git\\robotframework-zoomba\\src\\Zoomba\\SOAPLibrary.py", "lineno": 43, "tags": [], "inits": [], "keywords": [{"name": "Call Soap Method With List Object", "args": [{"name": "action", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "action=None"}, {"name": "soap_object", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "soap_object=None"}], "doc": "<p>Call Soap Method. Calls soap method with list object</p>\n<p>action: (string) SOAP Action to be called.</p>\n<p>soap_object: (list) Soap Object in list format, list must be ordered wrt schema</p>", "shortdoc": "Call Soap Method. Calls soap method with list object ", "tags": [], "source": "C:\\Git\\robotframework-zoomba\\src\\Zoomba\\SOAPLibrary.py", "lineno": 100}, {"name": "Call Soap Method With Object", "args": [{"name": "action", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "action=None"}, {"name": "soap_object", "types": [], "defaultValue": null, "kind": "VAR_NAMED", "required": false, "repr": "**soap_object"}], "doc": "<p>Call Soap Method with dictionary object. Calls soap method</p>\n<p>action: (string) SOAP Action to be called.</p>\n<p>soap_object: (dict) Soap Object in dict format, dict must contain all required parts of schema object.</p>", "shortdoc": "Call Soap Method with dictionary object. Calls soap method ", "tags": [], "source": "C:\\Git\\robotframework-zoomba\\src\\Zoomba\\SOAPLibrary.py", "lineno": 109}, {"name": "Convert Soap Response To Json", "args": [{"name": "soap_response", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "soap_response=None"}], "doc": "<p>Convert Soap Response To Dictionary: This keyword builds a dictionary from the sudsLibrary response</p>\n<p>json_actual_response: (request response object) The response from an API.</p>\n<p>return: There is no actual returned output, other than error messages when comparisons fail.</p>", "shortdoc": "Convert Soap Response To Dictionary: This keyword builds a dictionary from the sudsLibrary response", "tags": [], "source": "C:\\Git\\robotframework-zoomba\\src\\Zoomba\\SOAPLibrary.py", "lineno": 138}, {"name": "Create Soap Session", "args": [{"name": "host", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "host=None"}, {"name": "endpoint", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "endpoint=None"}, {"name": "alias", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "alias=None"}, {"name": "kwargs", "types": [], "defaultValue": null, "kind": "VAR_NAMED", "required": false, "repr": "**kwargs"}], "doc": "<p>Create Soap Session. This Keyword utilizes the WSDL to create a soap client.</p>\n<p>host: (string) The host url.</p>\n<p>endpoint: (string) SOAP API endpoint containing the actions to be referenced.</p>\n<p>**kwargs: (optional) Parameters that could be included to add options to client creation. Current supported parameters are:</p>\n<p>set_location: http address</p>", "shortdoc": "Create Soap Session. This Keyword utilizes the WSDL to create a soap client.", "tags": [], "source": "C:\\Git\\robotframework-zoomba\\src\\Zoomba\\SOAPLibrary.py", "lineno": 68}, {"name": "Create Soap Session And Fix Wsdl", "args": [{"name": "host", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "host=None"}, {"name": "endpoint", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "endpoint=None"}, {"name": "alias", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "alias=None"}, {"name": "kwargs", "types": [], "defaultValue": null, "kind": "VAR_NAMED", "required": false, "repr": "**kwargs"}], "doc": "<p>Create Soap Session. This Keyword utilizes the WSDL and directly accesses calls from sudsLibrary.</p>\n<p>host: (string) The host url.</p>\n<p>endpoint: (string) SOAP API endpoint containing the actions to be referenced.</p>\n<p>alias: (string} Sets the alias for the SudsLibrary Framework **kwargs: (optional) Parameters that could be included to add options to client creation. Current supported parameters are:</p>\n<p>set_location: http address</p>", "shortdoc": "Create Soap Session. This Keyword utilizes the WSDL and directly accesses calls from sudsLibrary.", "tags": [], "source": "C:\\Git\\robotframework-zoomba\\src\\Zoomba\\SOAPLibrary.py", "lineno": 51}, {"name": "Create Soap Session And Set Location", "args": [{"name": "host", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "host=None"}, {"name": "endpoint", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "endpoint=None"}, {"name": "alias", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "alias=None"}, {"name": "set_location", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "set_location=None"}, {"name": "fix", "types": [], "defaultValue": "False", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "fix=False"}], "doc": "<p>Create Soap Session and Set Location. In addition to the client creation, this keyword sets the location as specified.</p>\n<p>host: (string) The host url.</p>\n<p>endpoint: (string) SOAP API endpoint containing the actions to be referenced.</p>\n<p>set_location: (string) If set will overwrite the WSDL location with specified address.</p>\n<p>If set to None will replace location with host and endpoint specified</p>", "shortdoc": "Create Soap Session and Set Location. In addition to the client creation, this keyword sets the location as specified.", "tags": [], "source": "C:\\Git\\robotframework-zoomba\\src\\Zoomba\\SOAPLibrary.py", "lineno": 84}, {"name": "Create Wsdl Objects", "args": [{"name": "wsdl_type", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "wsdl_type=None"}, {"name": "object_dict", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "object_dict=None"}], "doc": "<p>Create Wsdl Objects. This Keyword utilizes the WSDL to create a WSDL object based on the information provided.</p>\n<p>wsdl_type: (string) Wsdl object to be created.</p>\n<p>object_dict: (dict) Python Dictionary containing values and nested dictionaries with construction similar to wsdl defined objects.</p>\n<p>return: (response object) Returns the SOAP client object.</p>", "shortdoc": "Create Wsdl Objects. This Keyword utilizes the WSDL to create a WSDL object based on the information provided.", "tags": [], "source": "C:\\Git\\robotframework-zoomba\\src\\Zoomba\\SOAPLibrary.py", "lineno": 124}], "dataTypes": {"enums": [], "typedDicts": []}}
libdoc = {"name": "SOAP_Library", "doc": "<p>Zoomba SOAP Library</p>\n<p>This class is the base Library used to generate automated SOAP Tests in the Zoomba Automation Framework.</p>", "version": "2.11.3", "generated": "2021-07-23 15:42:46", "type": "LIBRARY", "scope": "TEST", "docFormat": "HTML", "source": "C:\\Git\\robotframework-zoomba\\src\\Zoomba\\SOAPLibrary.py", "lineno": 43, "tags": [], "inits": [], "keywords": [{"name": "Call Soap Method With List Object", "args": [{"name": "action", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "action=None"}, {"name": "soap_object", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "soap_object=None"}], "doc": "<p>Call Soap Method. Calls soap method with list object</p>\n<p>action: (string) SOAP Action to be called.</p>\n<p>soap_object: (list) Soap Object in list format, list must be ordered wrt schema</p>", "shortdoc": "Call Soap Method. Calls soap method with list object ", "tags": [], "source": "C:\\Git\\robotframework-zoomba\\src\\Zoomba\\SOAPLibrary.py", "lineno": 100}, {"name": "Call Soap Method With Object", "args": [{"name": "action", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "action=None"}, {"name": "soap_object", "types": [], "defaultValue": null, "kind": "VAR_NAMED", "required": false, "repr": "**soap_object"}], "doc": "<p>Call Soap Method with dictionary object. Calls soap method</p>\n<p>action: (string) SOAP Action to be called.</p>\n<p>soap_object: (dict) Soap Object in dict format, dict must contain all required parts of schema object.</p>", "shortdoc": "Call Soap Method with dictionary object. Calls soap method ", "tags": [], "source": "C:\\Git\\robotframework-zoomba\\src\\Zoomba\\SOAPLibrary.py", "lineno": 109}, {"name": "Convert Soap Response To Json", "args": [{"name": "soap_response", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "soap_response=None"}], "doc": "<p>Convert Soap Response To Dictionary: This keyword builds a dictionary from the sudsLibrary response</p>\n<p>json_actual_response: (request response object) The response from an API.</p>\n<p>return: There is no actual returned output, other than error messages when comparisons fail.</p>", "shortdoc": "Convert Soap Response To Dictionary: This keyword builds a dictionary from the sudsLibrary response", "tags": [], "source": "C:\\Git\\robotframework-zoomba\\src\\Zoomba\\SOAPLibrary.py", "lineno": 138}, {"name": "Create Soap Session", "args": [{"name": "host", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "host=None"}, {"name": "endpoint", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "endpoint=None"}, {"name": "alias", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "alias=None"}, {"name": "kwargs", "types": [], "defaultValue": null, "kind": "VAR_NAMED", "required": false, "repr": "**kwargs"}], "doc": "<p>Create Soap Session. This Keyword utilizes the WSDL to create a soap client.</p>\n<p>host: (string) The host url.</p>\n<p>endpoint: (string) SOAP API endpoint containing the actions to be referenced.</p>\n<p>**kwargs: (optional) Parameters that could be included to add options to client creation. Current supported parameters are:</p>\n<p>set_location: http address</p>", "shortdoc": "Create Soap Session. This Keyword utilizes the WSDL to create a soap client.", "tags": [], "source": "C:\\Git\\robotframework-zoomba\\src\\Zoomba\\SOAPLibrary.py", "lineno": 68}, {"name": "Create Soap Session And Fix Wsdl", "args": [{"name": "host", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "host=None"}, {"name": "endpoint", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "endpoint=None"}, {"name": "alias", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "alias=None"}, {"name": "kwargs", "types": [], "defaultValue": null, "kind": "VAR_NAMED", "required": false, "repr": "**kwargs"}], "doc": "<p>Create Soap Session. This Keyword utilizes the WSDL and directly accesses calls from sudsLibrary.</p>\n<p>host: (string) The host url.</p>\n<p>endpoint: (string) SOAP API endpoint containing the actions to be referenced.</p>\n<p>alias: (string} Sets the alias for the SudsLibrary Framework **kwargs: (optional) Parameters that could be included to add options to client creation. Current supported parameters are:</p>\n<p>set_location: http address</p>", "shortdoc": "Create Soap Session. This Keyword utilizes the WSDL and directly accesses calls from sudsLibrary.", "tags": [], "source": "C:\\Git\\robotframework-zoomba\\src\\Zoomba\\SOAPLibrary.py", "lineno": 51}, {"name": "Create Soap Session And Set Location", "args": [{"name": "host", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "host=None"}, {"name": "endpoint", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "endpoint=None"}, {"name": "alias", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "alias=None"}, {"name": "set_location", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "set_location=None"}, {"name": "fix", "types": [], "defaultValue": "False", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "fix=False"}], "doc": "<p>Create Soap Session and Set Location. In addition to the client creation, this keyword sets the location as specified.</p>\n<p>host: (string) The host url.</p>\n<p>endpoint: (string) SOAP API endpoint containing the actions to be referenced.</p>\n<p>set_location: (string) If set will overwrite the WSDL location with specified address.</p>\n<p>If set to None will replace location with host and endpoint specified</p>", "shortdoc": "Create Soap Session and Set Location. In addition to the client creation, this keyword sets the location as specified.", "tags": [], "source": "C:\\Git\\robotframework-zoomba\\src\\Zoomba\\SOAPLibrary.py", "lineno": 84}, {"name": "Create Wsdl Objects", "args": [{"name": "wsdl_type", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "wsdl_type=None"}, {"name": "object_dict", "types": [], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "object_dict=None"}], "doc": "<p>Create Wsdl Objects. This Keyword utilizes the WSDL to create a WSDL object based on the information provided.</p>\n<p>wsdl_type: (string) Wsdl object to be created.</p>\n<p>object_dict: (dict) Python Dictionary containing values and nested dictionaries with construction similar to wsdl defined objects.</p>\n<p>return: (response object) Returns the SOAP client object.</p>", "shortdoc": "Create Wsdl Objects. This Keyword utilizes the WSDL to create a WSDL object based on the information provided.", "tags": [], "source": "C:\\Git\\robotframework-zoomba\\src\\Zoomba\\SOAPLibrary.py", "lineno": 124}], "dataTypes": {"enums": [], "typedDicts": []}}
</script>
<title></title>
</head>
Expand Down
14 changes: 9 additions & 5 deletions src/Zoomba/Helpers/AppiumCommon.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import itertools
from time import time
from selenium.webdriver.common.action_chains import ActionChains
from appium.webdriver.common.touch_action import TouchAction
from robot.libraries.BuiltIn import BuiltIn

SCREENSHOT_COUNTER = itertools.count()
Expand Down Expand Up @@ -56,16 +56,20 @@ def drag_and_drop(self, source, target):
locator ``target``."""
source_element = self._element_find(source, True, True)
target_element = self._element_find(target, True, True)
actions = ActionChains(self._current_application())
zoomba.log('Dragging source element "%s" to target element "%s".' % (source, target))
actions.drag_and_drop(source_element, target_element).perform()
actions = TouchAction(self._current_application())
actions.press(source_element)
actions.move_to(target_element)
actions.release().perform()


def drag_and_drop_by_offset(self, locator, x_offset=0, y_offset=0):
"""Drags the element found with ``locator`` to the given ``x_offset`` and ``y_offset``
coordinates.
"""
element = self._element_find(locator, True, True)
actions = ActionChains(self._current_application())
zoomba.log('Dragging element "%s" by offset (%s, %s).' % (locator, x_offset, y_offset))
actions.drag_and_drop_by_offset(element, x_offset, y_offset).perform()
actions = TouchAction(self._current_application())
actions.press(element)
actions.move_to(x=x_offset, y=y_offset)
actions.release().perform()
Loading

0 comments on commit e30e52f

Please sign in to comment.