@@ -41,7 +41,7 @@ describe("Facebook tests", async function () {
4141 console . log ( "Driver successfully quit" ) ;
4242 } ) ;
4343
44- afterEach ( async function ( ) {
44+ afterEach ( async function ( ) {
4545 if ( this . currentTest . state && this . currentTest . state === "failed" ) {
4646 let png = await driver . logScreenshot ( this . currentTest . title ) ;
4747 fs . copyFile ( png , './mochawesome-report/' + this . currentTest . title + '.png' , function ( err ) {
@@ -52,13 +52,14 @@ describe("Facebook tests", async function () {
5252 } ) ;
5353 addContext ( this , './' + this . currentTest . title + '.png' ) ;
5454 }
55- } )
55+ } ) ;
5656
5757 it ( "should log in via custom button" , async function ( ) {
58+ let userNameLabelElement ;
5859 if ( isAndroid ) {
59- var userNameLabelElement = "[@text='Nativescript User']" ;
60+ userNameLabelElement = "[@text='Nativescript User']" ;
6061 } else {
61- var userNameLabelElement = "[@name='Nativescript User']" ;
62+ userNameLabelElement = "[@name='Nativescript User']" ;
6263 }
6364
6465 const facebookButton = await driver . findElementByText ( "Custom" , SearchOptions . contains ) ;
@@ -81,6 +82,9 @@ describe("Facebook tests", async function () {
8182 await driver . wait ( 1000 ) ;
8283 await allFields [ 0 ] . sendKeys ( USERNAME ) ;
8384 } else {
85+ const continueBtn = await driver . findElementByText ( "Continue" ) ;
86+ await continueBtn . click ( ) ;
87+
8488 const passField = await driver . findElementByClassName ( driver . locators . getElementByName ( "securetextfield" ) ) ;
8589 await passField . click ( ) ;
8690 await passField . sendKeys ( PASSWORD ) ;
0 commit comments