@@ -555,29 +555,26 @@ async function signInWithEmailWithTestEmailAppInCoreWalletServicesApp(
555555 browser : Browser ,
556556 tag : string ,
557557 timestamp : number
558- ) : Promise < boolean > {
559- try {
560- console . log ( `Email:${ email } ` ) ;
561- await page . locator ( `[placeholder="name@domain.com"]` ) . waitFor ( { state : "visible" } ) ;
562- await page . locator ( '[placeholder="name@domain.com"]' ) . fill ( email ) ;
563- await page . locator ( 'button:has-text("Login with Email")' ) . click ( ) ;
564- await delay ( 10000 ) ;
565- const pages = await browser . contexts ( ) [ 0 ] . pages ( ) ;
566- // pages[0] is the first page, and pages[1] is the new page
567- await pages [ 1 ] . bringToFront ( ) ; // Bring the new page to the front
568- // Setup our JSON API endpoint
569- const ENDPOINT = `https://api.testmail.app/api/json?apikey=${ testEmailAppApiKey } &namespace=kelg8` ;
570- const res = await axios . get ( `${ ENDPOINT } &tag=${ tag } &livequery=true×tamp_from=${ timestamp } ` ) ;
571- const inbox = await res . data ;
572- const href = inbox . emails [ 0 ] . subject . match ( / \d + / ) [ 0 ] ;
573- console . error ( href ) ;
574- await pages [ 1 ] . locator ( `xpath=.//input[@type='text']` ) . first ( ) . type ( href ) ;
575- // useAutoCancel2FASetup(pages[1]);
576- return true ;
577- } catch ( err ) {
578- console . error ( err ) ;
579- return false ;
580- }
558+ ) : Promise < void > {
559+ console . log ( `Email:${ email } ` ) ;
560+ await delay ( 2000 ) ;
561+ await page . locator ( `button:has-text("Continue with Email/Phone")` ) . click ( ) ;
562+ await page . locator ( `[placeholder="name@domain.com"]` ) . waitFor ( { state : "visible" } ) ;
563+ await page . locator ( '[placeholder="name@domain.com"]' ) . fill ( email ) ;
564+ // Click on the blue arrow button next to the email input field
565+ await page . locator ( 'input[type="email"] + div > svg.cursor-pointer' ) . click ( ) ;
566+
567+ await delay ( 10000 ) ;
568+ const pages = await browser . contexts ( ) [ 0 ] . pages ( ) ;
569+ // pages[0] is the first page, and pages[1] is the new page
570+ await pages [ 1 ] . bringToFront ( ) ; // Bring the new page to the front
571+ // Setup our JSON API endpoint
572+ const ENDPOINT = `https://api.testmail.app/api/json?apikey=${ testEmailAppApiKey } &namespace=kelg8` ;
573+ const res = await axios . get ( `${ ENDPOINT } &tag=${ tag } &livequery=true×tamp_from=${ timestamp } ` ) ;
574+ const inbox = await res . data ;
575+ const href = inbox . emails [ 0 ] . subject . match ( / \d + / ) [ 0 ] ;
576+ console . error ( href ) ;
577+ await pages [ 1 ] . locator ( `xpath=.//input[@type='text']` ) . first ( ) . type ( href ) ;
581578}
582579async function signInWithMobileNumber ( {
583580 page,
0 commit comments