File tree Expand file tree Collapse file tree 4 files changed +21
-3
lines changed Expand file tree Collapse file tree 4 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ class MobileCommand(object):
49
49
END_TEST_COVERAGE = 'endTestCoverage'
50
50
LOCK = 'lock'
51
51
SHAKE = 'shake'
52
+ TOUCH_ID = 'touchId'
52
53
RESET = 'reset'
53
54
HIDE_KEYBOARD = 'hideKeyboard'
54
55
REPLACE_KEYS = 'replaceKeys'
Original file line number Diff line number Diff line change @@ -606,6 +606,15 @@ def shake(self):
606
606
self .execute (Command .SHAKE )
607
607
return self
608
608
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
+
609
618
def open_notifications (self ):
610
619
"""Open notification shade in Android (API Level 18 and above)
611
620
"""
@@ -784,6 +793,8 @@ def _addCommands(self):
784
793
('POST' , '/session/$sessionId/appium/device/lock' )
785
794
self .command_executor ._commands [Command .SHAKE ] = \
786
795
('POST' , '/session/$sessionId/appium/device/shake' )
796
+ self .command_executor ._commands [Command .TOUCH_ID ] = \
797
+ ('POST' , '/session/$sessionId/appium/simulator/touch_id' )
787
798
self .command_executor ._commands [Command .RESET ] = \
788
799
('POST' , '/session/$sessionId/appium/app/reset' )
789
800
self .command_executor ._commands [Command .HIDE_KEYBOARD ] = \
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ def setUp(self):
28
28
29
29
def tearDown (self ):
30
30
self .driver .quit ()
31
-
32
31
def test_lock (self ):
33
32
el = self .driver .find_element_by_id ('ButtonsExplain' )
34
33
self .assertIsNotNone (el )
@@ -44,6 +43,12 @@ def test_shake(self):
44
43
# what can we assert about this?
45
44
self .driver .shake ()
46
45
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
+
47
52
def test_hide_keyboard (self ):
48
53
el = self .driver .find_element_by_name ('TextFields, Uses of UITextField' )
49
54
el .click ()
Original file line number Diff line number Diff line change 11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
-
15
14
import os
16
15
17
16
# Returns abs path relative to this file and not cwd
22
21
23
22
def get_desired_capabilities (app ):
24
23
desired_caps = {
25
- 'deviceName' : 'iPhone Simulator ' ,
24
+ 'deviceName' : 'iPhone 5s ' ,
26
25
'platformName' : 'iOS' ,
26
+ 'platformVersion' : '10.1' ,
27
27
'app' : PATH ('../../apps/' + app ),
28
+ 'automationName' : 'XCUITest'
28
29
}
29
30
30
31
return desired_caps
You can’t perform that action at this time.
0 commit comments