@@ -58,7 +58,7 @@ describe('Appium', function () {
5858 it ( 'should grab all available contexts for screen' , async ( ) => {
5959 await app . resetApp ( )
6060 await app . waitForElement ( '~buttonStartWebviewCD' , smallWait )
61- await app . click ( '~buttonStartWebviewCD' )
61+ await app . tap ( '~buttonStartWebviewCD' )
6262 const val = await app . grabAllContexts ( )
6363 assert . deepEqual ( val , [ 'NATIVE_APP' , 'WEBVIEW_io.selendroid.testapp' ] )
6464 } )
@@ -164,7 +164,7 @@ describe('Appium', function () {
164164 it ( 'should set device orientation' , async ( ) => {
165165 await app . resetApp ( )
166166 await app . waitForElement ( '~buttonStartWebviewCD' , smallWait )
167- await app . click ( '~buttonStartWebviewCD' )
167+ await app . tap ( '~buttonStartWebviewCD' )
168168 await app . setOrientation ( 'LANDSCAPE' )
169169 await app . seeOrientationIs ( 'LANDSCAPE' )
170170 } )
@@ -174,15 +174,15 @@ describe('Appium', function () {
174174 it ( 'should switch context' , async ( ) => {
175175 await app . resetApp ( )
176176 await app . waitForElement ( '~buttonStartWebviewCD' , smallWait )
177- await app . click ( '~buttonStartWebviewCD' )
177+ await app . tap ( '~buttonStartWebviewCD' )
178178 await app . switchToContext ( 'WEBVIEW_io.selendroid.testapp' )
179179 const val = await app . grabContext ( )
180180 return assert . equal ( val , 'WEBVIEW_io.selendroid.testapp' )
181181 } )
182182
183183 it ( 'should switch to native and web contexts @quick' , async ( ) => {
184184 await app . resetApp ( )
185- await app . click ( '~buttonStartWebviewCD' )
185+ await app . tap ( '~buttonStartWebviewCD' )
186186 await app . see ( 'WebView location' )
187187 await app . switchToWeb ( )
188188 let val = await app . grabContext ( )
@@ -219,14 +219,14 @@ describe('Appium', function () {
219219 describe ( '#hideDeviceKeyboard' , ( ) => {
220220 it ( 'should hide device Keyboard @quick' , async ( ) => {
221221 await app . resetApp ( )
222- await app . click ( '~startUserRegistrationCD' )
222+ await app . tap ( '~startUserRegistrationCD' )
223223 try {
224- await app . click ( '//android.widget.CheckBox' )
224+ await app . tap ( '//android.widget.CheckBox' )
225225 } catch ( e ) {
226- e . message . should . include ( 'element ' )
226+ e . message . should . include ( 'Request failed with status code 404 ' )
227227 }
228228 await app . hideDeviceKeyboard ( 'pressKey' , 'Done' )
229- await app . click ( '//android.widget.CheckBox' )
229+ await app . tap ( '//android.widget.CheckBox' )
230230 } )
231231
232232 it ( 'should assert if no keyboard' , async ( ) => {
@@ -268,7 +268,7 @@ describe('Appium', function () {
268268 } )
269269
270270 it ( 'should react on swipe action' , async ( ) => {
271- await app . click ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
271+ await app . tap ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
272272 await app . waitForText ( 'Gesture Type' , 10 , "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
273273 await app . swipe ( "//android.widget.LinearLayout[@resource-id = 'io.selendroid.testapp:id/LinearLayout1']" , 800 , 1200 , 1000 )
274274 const type = await app . grabTextFrom ( "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
@@ -280,7 +280,7 @@ describe('Appium', function () {
280280 } )
281281
282282 it ( 'should react on swipeDown action' , async ( ) => {
283- await app . click ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
283+ await app . tap ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
284284 await app . waitForText ( 'Gesture Type' , 10 , "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
285285 await app . swipeDown ( "//android.widget.LinearLayout[@resource-id = 'io.selendroid.testapp:id/LinearLayout1']" , 1200 , 1000 )
286286 const type = await app . grabTextFrom ( "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
@@ -291,15 +291,15 @@ describe('Appium', function () {
291291
292292 it ( 'run simplified swipeDown @quick' , async ( ) => {
293293 await app . resetApp ( )
294- await app . click ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
294+ await app . tap ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
295295 await app . waitForText ( 'Gesture Type' , 10 , "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
296296 await app . swipeDown ( "//android.widget.LinearLayout[@resource-id = 'io.selendroid.testapp:id/LinearLayout1']" , 120 , 100 )
297297 const type = await app . grabTextFrom ( "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
298298 assert . equal ( type , 'FLICK' )
299299 } )
300300
301301 it ( 'should react on swipeUp action' , async ( ) => {
302- await app . click ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
302+ await app . tap ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
303303 await app . waitForText ( 'Gesture Type' , 10 , "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
304304 await app . swipeUp ( "//android.widget.LinearLayout[@resource-id = 'io.selendroid.testapp:id/LinearLayout1']" , 1200 , 1000 )
305305 const type = await app . grabTextFrom ( "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
@@ -309,7 +309,7 @@ describe('Appium', function () {
309309 } )
310310
311311 it ( 'should react on swipeRight action' , async ( ) => {
312- await app . click ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
312+ await app . tap ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
313313 await app . waitForText ( 'Gesture Type' , 10 , "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
314314 await app . swipeRight ( "//android.widget.LinearLayout[@resource-id = 'io.selendroid.testapp:id/LinearLayout1']" , 800 , 1000 )
315315 const type = await app . grabTextFrom ( "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
@@ -319,7 +319,7 @@ describe('Appium', function () {
319319 } )
320320
321321 it ( 'should react on swipeLeft action' , async ( ) => {
322- await app . click ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
322+ await app . tap ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
323323 await app . waitForText ( 'Gesture Type' , 10 , "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
324324 await app . swipeLeft ( "//android.widget.LinearLayout[@resource-id = 'io.selendroid.testapp:id/LinearLayout1']" , 800 , 1000 )
325325 const type = await app . grabTextFrom ( "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
@@ -346,7 +346,7 @@ describe('Appium', function () {
346346 it ( 'should assert when you dont scroll the document anymore' , async ( ) => {
347347 await app . resetApp ( )
348348 await app . waitForElement ( '~startUserRegistrationCD' , smallWait )
349- await app . click ( '~startUserRegistrationCD' )
349+ await app . tap ( '~startUserRegistrationCD' )
350350 try {
351351 await app . swipeTo ( '//android.widget.CheckBox' , '//android.widget.ScrollView/android.widget.LinearLayout' , 'up' , 30 , 100 , 500 )
352352 } catch ( e ) {
@@ -357,13 +357,13 @@ describe('Appium', function () {
357357 it ( 'should react on swipeTo action' , async ( ) => {
358358 await app . resetApp ( )
359359 await app . waitForElement ( '~startUserRegistrationCD' , smallWait )
360- await app . click ( '~startUserRegistrationCD' )
360+ await app . tap ( '~startUserRegistrationCD' )
361361 await app . swipeTo ( '//android.widget.CheckBox' , '//android.widget.ScrollView/android.widget.LinearLayout' , 'up' , 30 , 100 , 700 )
362362 } )
363363
364364 describe ( '#performTouchAction' , ( ) => {
365365 it ( 'should react on swipeUp action @second' , async ( ) => {
366- await app . click ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
366+ await app . tap ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
367367 await app . waitForText ( 'Gesture Type' , 10 , "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
368368 await app . swipeUp ( "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
369369 const type = await app . grabTextFrom ( "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
@@ -374,7 +374,7 @@ describe('Appium', function () {
374374
375375 it ( 'should react on swipeDown action @second' , async ( ) => {
376376 await app . resetApp ( )
377- await app . click ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
377+ await app . tap ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
378378 await app . waitForText ( 'Gesture Type' , 10 , "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
379379 await app . swipeUp ( "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
380380 const type = await app . grabTextFrom ( "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
@@ -384,7 +384,7 @@ describe('Appium', function () {
384384 } )
385385
386386 it ( 'should react on swipeLeft action' , async ( ) => {
387- await app . click ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
387+ await app . tap ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
388388 await app . waitForText ( 'Gesture Type' , 10 , "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
389389 await app . swipeLeft ( "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
390390 const type = await app . grabTextFrom ( "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
@@ -394,7 +394,7 @@ describe('Appium', function () {
394394 } )
395395
396396 it ( 'should react on swipeRight action' , async ( ) => {
397- await app . click ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
397+ await app . tap ( "//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']" )
398398 await app . waitForText ( 'Gesture Type' , 10 , "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
399399 await app . swipeRight ( "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
400400 const type = await app . grabTextFrom ( "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']" )
@@ -423,7 +423,7 @@ describe('Appium', function () {
423423
424424 it ( 'should work inside web view as normally @quick' , async ( ) => {
425425 await app . resetApp ( )
426- await app . click ( '~buttonStartWebviewCD' )
426+ await app . tap ( '~buttonStartWebviewCD' )
427427 await app . switchToWeb ( )
428428 await app . see ( 'Prefered Car:' )
429429 } )
@@ -433,12 +433,12 @@ describe('Appium', function () {
433433 it ( 'should be able to send special keys to element @second' , async ( ) => {
434434 await app . resetApp ( )
435435 await app . waitForElement ( '~startUserRegistrationCD' , smallWait )
436- await app . click ( '~startUserRegistrationCD' )
437- await app . click ( '~email of the customer' )
436+ await app . tap ( '~startUserRegistrationCD' )
437+ await app . tap ( '~email of the customer' )
438438 await app . appendField ( '~email of the customer' , '1' )
439439 await app . hideDeviceKeyboard ( 'pressKey' , 'Done' )
440440 await app . swipeTo ( '//android.widget.Button' , '//android.widget.ScrollView/android.widget.LinearLayout' , 'up' , 30 , 100 , 700 )
441- await app . click ( '//android.widget.Button' )
441+ await app . tap ( '//android.widget.Button' )
442442 await app . see ( '1' , '#io.selendroid.testapp:id/label_email_data' )
443443 } )
444444 } )
@@ -486,7 +486,7 @@ describe('Appium', function () {
486486
487487 it ( 'should click by xpath' , async ( ) => {
488488 await app . resetApp ( )
489- await app . click ( '//android.widget.ImageButton[@content-desc = "startUserRegistrationCD"]' )
489+ await app . tap ( '//android.widget.ImageButton[@content-desc = "startUserRegistrationCD"]' )
490490 await app . seeElement ( '//android.widget.TextView[@content-desc="label_usernameCD"]' )
491491 } )
492492 } )
@@ -495,34 +495,34 @@ describe('Appium', function () {
495495 it ( 'should fill field by accessibility id' , async ( ) => {
496496 await app . resetApp ( )
497497 await app . waitForElement ( '~startUserRegistrationCD' , smallWait )
498- await app . click ( '~startUserRegistrationCD' )
498+ await app . tap ( '~startUserRegistrationCD' )
499499 await app . fillField ( '~email of the customer' , 'Nothing special' )
500500 await app . hideDeviceKeyboard ( 'pressKey' , 'Done' )
501501 await app . swipeTo ( '//android.widget.Button' , '//android.widget.ScrollView/android.widget.LinearLayout' , 'up' , 30 , 100 , 700 )
502- await app . click ( '//android.widget.Button' )
502+ await app . tap ( '//android.widget.Button' )
503503 await app . see ( 'Nothing special' , '//android.widget.TextView[@resource-id="io.selendroid.testapp:id/label_email_data"]' )
504504 } )
505505
506506 it ( 'should fill field by xpath' , async ( ) => {
507507 await app . resetApp ( )
508508 await app . waitForElement ( '~startUserRegistrationCD' , smallWait )
509- await app . click ( '~startUserRegistrationCD' )
509+ await app . tap ( '~startUserRegistrationCD' )
510510 await app . fillField ( '//android.widget.EditText[@content-desc="email of the customer"]' , 'Nothing special' )
511511 await app . hideDeviceKeyboard ( 'pressKey' , 'Done' )
512512 await app . swipeTo ( '//android.widget.Button' , '//android.widget.ScrollView/android.widget.LinearLayout' , 'up' , 30 , 100 , 700 )
513- await app . click ( '//android.widget.Button' )
513+ await app . tap ( '//android.widget.Button' )
514514 await app . see ( 'Nothing special' , '//android.widget.TextView[@resource-id="io.selendroid.testapp:id/label_email_data"]' )
515515 } )
516516
517517 it ( 'should append field value @second' , async ( ) => {
518518 await app . resetApp ( )
519519 await app . waitForElement ( '~startUserRegistrationCD' , smallWait )
520- await app . click ( '~startUserRegistrationCD' )
520+ await app . tap ( '~startUserRegistrationCD' )
521521 await app . fillField ( '~email of the customer' , 'Nothing special' )
522522 await app . appendField ( '~email of the customer' , 'blabla' )
523523 await app . hideDeviceKeyboard ( 'pressKey' , 'Done' )
524524 await app . swipeTo ( '//android.widget.Button' , '//android.widget.ScrollView/android.widget.LinearLayout' , 'up' , 30 , 100 , 700 )
525- await app . click ( '//android.widget.Button' )
525+ await app . tap ( '//android.widget.Button' )
526526 await app . see ( 'Nothing specialblabla' , '//android.widget.TextView[@resource-id="io.selendroid.testapp:id/label_email_data"]' )
527527 } )
528528 } )
@@ -531,7 +531,7 @@ describe('Appium', function () {
531531 it ( 'should clear a given element' , async ( ) => {
532532 await app . resetApp ( )
533533 await app . waitForElement ( '~startUserRegistrationCD' , smallWait )
534- await app . click ( '~startUserRegistrationCD' )
534+ await app . tap ( '~startUserRegistrationCD' )
535535 await app . fillField ( '~email of the customer' , 'Nothing special' )
536536 await app . see ( 'Nothing special' , '~email of the customer' )
537537 await app . clearField ( '~email of the customer' )
@@ -559,7 +559,7 @@ describe('Appium', function () {
559559 await app . appendField ( '//android.widget.EditText[@content-desc="email of the customer"]' , '1' )
560560 await app . hideDeviceKeyboard ( 'pressKey' , 'Done' )
561561 await app . swipeTo ( '//android.widget.Button' , '//android.widget.ScrollView/android.widget.LinearLayout' , 'up' , 30 , 100 , 700 )
562- await app . click ( '//android.widget.Button' )
562+ await app . tap ( '//android.widget.Button' )
563563 await app . see ( '1' , '//android.widget.TextView[@resource-id="io.selendroid.testapp:id/label_email_data"]' )
564564 const id = await app . grabNumberOfVisibleElements ( '//android.widget.TextView[@resource-id="io.selendroid.testapp:id/label_email_data"]' , 'contentDescription' )
565565 assert . strictEqual ( 1 , id )
@@ -582,7 +582,7 @@ describe('Appium', function () {
582582 it ( 'should use Android locators' , async ( ) => {
583583 await app . resetApp ( )
584584 await app . waitForElement ( '~startUserRegistrationCD' , smallWait )
585- await app . click ( { android : '~startUserRegistrationCD' , ios : 'fake-element' } )
585+ await app . tap ( { android : '~startUserRegistrationCD' , ios : 'fake-element' } )
586586 await app . see ( 'Welcome to register a new User' )
587587 } )
588588
0 commit comments