File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ class MobileCommand(object):
4949 END_TEST_COVERAGE = 'endTestCoverage'
5050 LOCK = 'lock'
5151 SHAKE = 'shake'
52+ TOUCH_ID = 'touchId'
5253 RESET = 'reset'
5354 HIDE_KEYBOARD = 'hideKeyboard'
5455 REPLACE_KEYS = 'replaceKeys'
Original file line number Diff line number Diff line change @@ -606,6 +606,15 @@ def shake(self):
606606 self .execute (Command .SHAKE )
607607 return self
608608
609+ def touch_id (self , match ):
610+ """Do a fingerprint scan
611+ """
612+ data = {
613+ 'match' : match
614+ }
615+ self .execute (Command .TOUCH_ID , data )
616+ return self
617+
609618 def open_notifications (self ):
610619 """Open notification shade in Android (API Level 18 and above)
611620 """
@@ -784,6 +793,8 @@ def _addCommands(self):
784793 ('POST' , '/session/$sessionId/appium/device/lock' )
785794 self .command_executor ._commands [Command .SHAKE ] = \
786795 ('POST' , '/session/$sessionId/appium/device/shake' )
796+ self .command_executor ._commands [Command .TOUCH_ID ] = \
797+ ('POST' , '/session/$sessionId/appium/simulator/touch_id' )
787798 self .command_executor ._commands [Command .RESET ] = \
788799 ('POST' , '/session/$sessionId/appium/app/reset' )
789800 self .command_executor ._commands [Command .HIDE_KEYBOARD ] = \
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ def setUp(self):
2828
2929 def tearDown (self ):
3030 self .driver .quit ()
31-
3231 def test_lock (self ):
3332 el = self .driver .find_element_by_id ('ButtonsExplain' )
3433 self .assertIsNotNone (el )
@@ -44,6 +43,12 @@ def test_shake(self):
4443 # what can we assert about this?
4544 self .driver .shake ()
4645
46+
47+ def test_touch_id (self ):
48+ # nothing to assert, just verify that it doesn't blow up
49+ self .driver .touch_id (True )
50+ self .driver .touch_id (False )
51+
4752 def test_hide_keyboard (self ):
4853 el = self .driver .find_element_by_name ('TextFields, Uses of UITextField' )
4954 el .click ()
Original file line number Diff line number Diff line change 1111# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212# See the License for the specific language governing permissions and
1313# limitations under the License.
14-
1514import os
1615
1716# Returns abs path relative to this file and not cwd
2221
2322def get_desired_capabilities (app ):
2423 desired_caps = {
25- 'deviceName' : 'iPhone Simulator ' ,
24+ 'deviceName' : 'iPhone 5s ' ,
2625 'platformName' : 'iOS' ,
26+ 'platformVersion' : '10.1' ,
2727 'app' : PATH ('../../apps/' + app ),
28+ 'automationName' : 'XCUITest'
2829 }
2930
3031 return desired_caps
You can’t perform that action at this time.
0 commit comments