File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 11const wdio = require ( "webdriverio" ) ;
22const { Key } = require ( 'webdriverio' ) ;
33const { exec } = require ( 'child_process' ) ;
4- const { totp } = require ( 'otplib' ) . totp ;
4+ const { otplib } = require ( 'otplib' ) ;
55
66function sleep ( ms ) {
77 return new Promise ( resolve => setTimeout ( resolve , ms ) ) ;
@@ -83,7 +83,7 @@ async function runSSD() {
8383 await driver . sendKeys ( id_arr ) ;
8484 await driver . saveScreenshot ( 'login02.png' ) ;
8585 await driver . sendKeys ( [ Key . Tab ] ) ;
86- const token_value = totp . generate ( process . env . TOTP_SECRET , { algorithm : 'sha256' } )
86+ const token_value = otplib . totp . generate ( process . env . TOTP_SECRET , { algorithm : 'sha256' } )
8787 token_arr = [ ...token_value ] ;
8888 await driver . sendKeys ( token_arr ) ;
8989 await driver . saveScreenshot ( 'login03.png' ) ;
You can’t perform that action at this time.
0 commit comments