diff --git a/.travis.yml b/.travis.yml index ed6e2bf33..8ddcc472b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,11 @@ language: python python: - "2.7" - - "3.7" + - "3.6" install: - pip install -r ci-requirements.txt script: - - pylint --rcfile .pylintrc appium test - - pytest test/unit/* + - python -m pylint --rcfile .pylintrc appium test --py3k + - python -m pytest test/unit/* diff --git a/appium/webdriver/webdriver.py b/appium/webdriver/webdriver.py index bf563d483..5d171e65e 100644 --- a/appium/webdriver/webdriver.py +++ b/appium/webdriver/webdriver.py @@ -108,6 +108,7 @@ def __init__(self, command_executor='http://127.0.0.1:4444/wd/hub', By.IOS_PREDICATE = MobileBy.IOS_PREDICATE By.IOS_CLASS_CHAIN = MobileBy.IOS_CLASS_CHAIN By.ANDROID_UIAUTOMATOR = MobileBy.ANDROID_UIAUTOMATOR + By.ANDROID_VIEWTAG = MobileBy.ANDROID_VIEWTAG By.ACCESSIBILITY_ID = MobileBy.ACCESSIBILITY_ID By.IMAGE = MobileBy.IMAGE diff --git a/ci-requirements.txt b/ci-requirements.txt index 16d13078d..9638eff95 100644 --- a/ci-requirements.txt +++ b/ci-requirements.txt @@ -1,3 +1,4 @@ +selenium astroid isort pylint diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 000000000..cc173e9d7 --- /dev/null +++ b/test/__init__.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/test/unit/multi_action_tests.py b/test/unit/multi_action_tests.py index a3a883548..4e0133e40 100644 --- a/test/unit/multi_action_tests.py +++ b/test/unit/multi_action_tests.py @@ -27,7 +27,7 @@ def test_json(self): json = { 'actions': [ [ - {'action': 'press', 'options': {'x': None, 'y': None, 'element': 1}}, + {'action': 'press', 'options': {'element': 1}}, {'action': 'moveTo', 'options': {'x': 10, 'y': 20}}, {'action': 'release', 'options': {}} ], @@ -46,7 +46,7 @@ def test_json(self): class DriverStub(object): def execute(self, action, params): - print "driver.execute called" + print("driver.execute called") class ElementStub(object): diff --git a/test/unit/touch_action_tests.py b/test/unit/touch_action_tests.py index a9cab446c..eb4468d45 100644 --- a/test/unit/touch_action_tests.py +++ b/test/unit/touch_action_tests.py @@ -23,7 +23,7 @@ def setUp(self): def test_tap_json(self): json = [ - {'action': 'tap', 'options': {'x': None, 'y': None, 'count': 1, 'element': 1}} + {'action': 'tap', 'options': {'count': 1, 'element': 1}} ] self._touch_action.tap(ElementStub(1)) self.assertEqual(json, self._touch_action.json_wire_gestures) @@ -38,7 +38,7 @@ def test_tap_x_y_json(self): class DriverStub(object): def execute(self, action, params): - print "driver.execute called" + print("driver.execute called") class ElementStub(object):