Skip to content

Commit 8a3ac84

Browse files
authored
add selenium into ci-requirements (appium#240)
fix pylint add --py3k
1 parent 098581a commit 8a3ac84

6 files changed

Lines changed: 22 additions & 7 deletions

File tree

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
language: python
22
python:
33
- "2.7"
4-
- "3.7"
4+
- "3.6"
55

66
install:
77
- pip install -r ci-requirements.txt
88

99
script:
10-
- pylint --rcfile .pylintrc appium test
11-
- pytest test/unit/*
10+
- python -m pylint --rcfile .pylintrc appium test --py3k
11+
- python -m pytest test/unit/*

appium/webdriver/webdriver.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def __init__(self, command_executor='http://127.0.0.1:4444/wd/hub',
108108
By.IOS_PREDICATE = MobileBy.IOS_PREDICATE
109109
By.IOS_CLASS_CHAIN = MobileBy.IOS_CLASS_CHAIN
110110
By.ANDROID_UIAUTOMATOR = MobileBy.ANDROID_UIAUTOMATOR
111+
By.ANDROID_VIEWTAG = MobileBy.ANDROID_VIEWTAG
111112
By.ACCESSIBILITY_ID = MobileBy.ACCESSIBILITY_ID
112113
By.IMAGE = MobileBy.IMAGE
113114

ci-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
selenium
12
astroid
23
isort
34
pylint

test/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env python
2+
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.

test/unit/multi_action_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_json(self):
2727
json = {
2828
'actions': [
2929
[
30-
{'action': 'press', 'options': {'x': None, 'y': None, 'element': 1}},
30+
{'action': 'press', 'options': {'element': 1}},
3131
{'action': 'moveTo', 'options': {'x': 10, 'y': 20}},
3232
{'action': 'release', 'options': {}}
3333
],
@@ -46,7 +46,7 @@ def test_json(self):
4646

4747
class DriverStub(object):
4848
def execute(self, action, params):
49-
print "driver.execute called"
49+
print("driver.execute called")
5050

5151

5252
class ElementStub(object):

test/unit/touch_action_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def setUp(self):
2323

2424
def test_tap_json(self):
2525
json = [
26-
{'action': 'tap', 'options': {'x': None, 'y': None, 'count': 1, 'element': 1}}
26+
{'action': 'tap', 'options': {'count': 1, 'element': 1}}
2727
]
2828
self._touch_action.tap(ElementStub(1))
2929
self.assertEqual(json, self._touch_action.json_wire_gestures)
@@ -38,7 +38,7 @@ def test_tap_x_y_json(self):
3838

3939
class DriverStub(object):
4040
def execute(self, action, params):
41-
print "driver.execute called"
41+
print("driver.execute called")
4242

4343

4444
class ElementStub(object):

0 commit comments

Comments
 (0)