ag-awsauth 0.0.273 → 0.0.275
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helpers/browser.js +17 -8
- package/package.json +1 -1
package/dist/helpers/browser.js
CHANGED
|
@@ -83,12 +83,17 @@ function getMFA(p) {
|
|
|
83
83
|
const page = yield (0, exports.goToPage)(p.verificationUriComplete);
|
|
84
84
|
//
|
|
85
85
|
(0, log_1.info)('checking for auth request');
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
(
|
|
91
|
-
|
|
86
|
+
try {
|
|
87
|
+
const verif = yield page.waitForSelector('#cli_verification_btn', {
|
|
88
|
+
timeout: config_1.timeoutShortMs,
|
|
89
|
+
});
|
|
90
|
+
if (verif) {
|
|
91
|
+
(0, log_1.info)('clicking auth request button');
|
|
92
|
+
yield verif.click();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
catch (e) {
|
|
96
|
+
//
|
|
92
97
|
}
|
|
93
98
|
//
|
|
94
99
|
(0, log_1.info)('username block');
|
|
@@ -103,8 +108,12 @@ function getMFA(p) {
|
|
|
103
108
|
yield page.keyboard.type(p.creds.password);
|
|
104
109
|
yield page.$eval('#password-submit-button button', (el) => el.click());
|
|
105
110
|
yield (0, sleep_1.sleep)(250);
|
|
106
|
-
|
|
107
|
-
|
|
111
|
+
try {
|
|
112
|
+
yield page.waitForNetworkIdle({ idleTime: 250, timeout: 3000 });
|
|
113
|
+
}
|
|
114
|
+
catch (e) {
|
|
115
|
+
//
|
|
116
|
+
}
|
|
108
117
|
try {
|
|
109
118
|
(0, log_1.info)('wait optional alert message');
|
|
110
119
|
const messageDiv = yield page.waitForSelector('.awsui-alert-message', {
|