Skip to content

Commit 7d99e73

Browse files
authored
Update ssd.js
1 parent 3f2d756 commit 7d99e73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ssd.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const wdio = require("webdriverio");
22
const { Key } = require('webdriverio');
33
const { exec } = require('child_process');
4-
const { totp } = require('otplib').totp;
4+
const { otplib } = require('otplib');
55

66
function 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');

0 commit comments

Comments
 (0)