@@ -50,11 +50,17 @@ export const login = async (browser: Browser, nhsLoginUsername: string): Promise
5050 }
5151
5252 await page . waitForURL ( "**/enter-email" , { timeout : 30000 } ) ;
53- await page . getByLabel ( "Email address" ) . fill ( user . nhsLoginUsername ) ;
53+ await page . getByLabel ( "Email address" ) . evaluate ( ( input : HTMLInputElement , fillText ) => {
54+ input . value = fillText ;
55+ input . dispatchEvent ( new Event ( "input" ) ) ;
56+ } , user . nhsLoginUsername ) ;
5457 await page . getByRole ( "button" , { name : "Continue" } ) . click ( ) ;
5558
5659 await page . waitForURL ( "**/log-in-password" , { timeout : 30000 } ) ;
57- await page . getByRole ( "textbox" , { name : "Password" } ) . fill ( user . nhsLoginPassword ) ;
60+ await page . getByRole ( "textbox" , { name : "Password" } ) . evaluate ( ( input : HTMLInputElement , fillText ) => {
61+ input . value = fillText ;
62+ input . dispatchEvent ( new Event ( "input" ) ) ;
63+ } , user . nhsLoginPassword ) ;
5864 await page . getByRole ( "button" , { name : "Continue" } ) . click ( ) ;
5965
6066 await page . waitForURL ( / \/ ( e n t e r - m o b i l e - c o d e | c h o o s e - a u t h e n t i c a t i o n - m e t h o d ) $ / , { timeout : 30000 } ) ;
@@ -64,7 +70,10 @@ export const login = async (browser: Browser, nhsLoginUsername: string): Promise
6470 }
6571
6672 await page . waitForURL ( "**/enter-mobile-code" , { timeout : 30000 } ) ;
67- await page . getByRole ( "textbox" , { name : "Security code" } ) . fill ( user . nhsLoginOTP ) ;
73+ await page . getByRole ( "textbox" , { name : "Security code" } ) . evaluate ( ( input : HTMLInputElement , fillText ) => {
74+ input . value = fillText ;
75+ input . dispatchEvent ( new Event ( "input" ) ) ;
76+ } , user . nhsLoginOTP ) ;
6877 await page . getByRole ( "button" , { name : "Continue" } ) . click ( ) ;
6978
7079 if ( useFakeAuth ) {
0 commit comments