Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions appium/webdriver/mobilecommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class MobileCommand(object):
END_TEST_COVERAGE = 'endTestCoverage'
LOCK = 'lock'
SHAKE = 'shake'
TOUCH_ID = 'touchId'
RESET = 'reset'
HIDE_KEYBOARD = 'hideKeyboard'
REPLACE_KEYS = 'replaceKeys'
Expand Down
11 changes: 11 additions & 0 deletions appium/webdriver/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,15 @@ def shake(self):
self.execute(Command.SHAKE)
return self

def touch_id(self, match):
"""Do a fingerprint scan
"""
data = {
'match': match
}
self.execute(Command.TOUCH_ID, data)
return self

def open_notifications(self):
"""Open notification shade in Android (API Level 18 and above)
"""
Expand Down Expand Up @@ -784,6 +793,8 @@ def _addCommands(self):
('POST', '/session/$sessionId/appium/device/lock')
self.command_executor._commands[Command.SHAKE] = \
('POST', '/session/$sessionId/appium/device/shake')
self.command_executor._commands[Command.TOUCH_ID] = \
('POST', '/session/$sessionId/appium/simulator/touch_id')
self.command_executor._commands[Command.RESET] = \
('POST', '/session/$sessionId/appium/app/reset')
self.command_executor._commands[Command.HIDE_KEYBOARD] = \
Expand Down
7 changes: 6 additions & 1 deletion test/functional/ios/appium_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def setUp(self):

def tearDown(self):
self.driver.quit()

def test_lock(self):
el = self.driver.find_element_by_id('ButtonsExplain')
self.assertIsNotNone(el)
Expand All @@ -44,6 +43,12 @@ def test_shake(self):
# what can we assert about this?
self.driver.shake()


def test_touch_id(self):
# nothing to assert, just verify that it doesn't blow up
self.driver.touch_id(True)
self.driver.touch_id(False)

def test_hide_keyboard(self):
el = self.driver.find_element_by_name('TextFields, Uses of UITextField')
el.click()
Expand Down
5 changes: 3 additions & 2 deletions test/functional/ios/desired_capabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# 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.

import os

# Returns abs path relative to this file and not cwd
Expand All @@ -22,9 +21,11 @@

def get_desired_capabilities(app):
desired_caps = {
'deviceName': 'iPhone Simulator',
'deviceName': 'iPhone 5s',
'platformName': 'iOS',
'platformVersion': '10.1',
'app': PATH('../../apps/' + app),
'automationName': 'XCUITest'
}

return desired_caps