@auxcode/auxta 1.3.48 → 1.3.50
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/build/cjs/macros/helpers/code.helper.d.ts +1 -1
- package/build/cjs/macros/helpers/code.helper.js +7 -7
- package/build/esm/macros/helpers/code.helper.d.ts +1 -1
- package/build/esm/macros/helpers/code.helper.js +7 -7
- package/build/tsconfig-cjs.tsbuildinfo +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -16,7 +16,7 @@ export declare class FunctionHelper extends ExtendDefaultPage {
|
|
|
16
16
|
restartBrowser(): Promise<void>;
|
|
17
17
|
clickAndWaitForPageToBeCreated(selector: string, page?: import("puppeteer").Page): Promise<void>;
|
|
18
18
|
closeLastPage(page?: import("puppeteer").Page): Promise<void>;
|
|
19
|
-
microsoftLogin(button: string, email: string, password: string): Promise<void>;
|
|
19
|
+
microsoftLogin(button: string, email: string, password: string, page?: import("puppeteer").Page): Promise<void>;
|
|
20
20
|
}
|
|
21
21
|
declare const _default: FunctionHelper;
|
|
22
22
|
export default _default;
|
|
@@ -162,7 +162,7 @@ class FunctionHelper extends extend_default_page_1.ExtendDefaultPage {
|
|
|
162
162
|
yield pages[pages.length - 1].close();
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
|
-
microsoftLogin(button, email, password) {
|
|
165
|
+
microsoftLogin(button, email, password, page = puppeteer_1.default.defaultPage) {
|
|
166
166
|
var _a;
|
|
167
167
|
return __awaiter(this, void 0, void 0, function* () {
|
|
168
168
|
const email_input = 'input[type="email"]';
|
|
@@ -170,8 +170,8 @@ class FunctionHelper extends extend_default_page_1.ExtendDefaultPage {
|
|
|
170
170
|
const next_button = 'input[value="Next"]';
|
|
171
171
|
const sign_in_button = 'input[value="Sign in"]';
|
|
172
172
|
const no_button = 'input.ext-secondary';
|
|
173
|
-
yield this.clickAndWaitForPageToBeCreated(button);
|
|
174
|
-
const pages = yield
|
|
173
|
+
yield this.clickAndWaitForPageToBeCreated(button, page);
|
|
174
|
+
const pages = yield page.browser().pages();
|
|
175
175
|
const loginPage = pages[pages.length - 1];
|
|
176
176
|
yield this.extend_page_functions(loginPage);
|
|
177
177
|
yield loginPage.waitForNetworkIdle();
|
|
@@ -179,14 +179,14 @@ class FunctionHelper extends extend_default_page_1.ExtendDefaultPage {
|
|
|
179
179
|
yield loginPage.type(email_input, email, { delay: 0 });
|
|
180
180
|
yield loginPage.keyboard.press('Enter');
|
|
181
181
|
yield loginPage.waitForNetworkIdle();
|
|
182
|
-
let isWorkOrPersonalVisible = yield
|
|
182
|
+
let isWorkOrPersonalVisible = yield page.$('div.table');
|
|
183
183
|
if (!!isWorkOrPersonalVisible) {
|
|
184
|
-
yield (yield
|
|
184
|
+
yield (yield page.$$('div.table'))[0].click();
|
|
185
185
|
console.log('Then', 'I clicked Work or school account', AuxTA_1.StepStatus.PASSED);
|
|
186
|
-
yield
|
|
186
|
+
yield page.waitForNetworkIdle();
|
|
187
187
|
}
|
|
188
188
|
else {
|
|
189
|
-
yield
|
|
189
|
+
yield page.waitForNetworkIdle();
|
|
190
190
|
}
|
|
191
191
|
yield this.waitForSelector('visible', sign_in_button, 60000, loginPage);
|
|
192
192
|
yield this.waitForSelector('visible', password_input, 6000, loginPage);
|
|
@@ -16,7 +16,7 @@ export declare class FunctionHelper extends ExtendDefaultPage {
|
|
|
16
16
|
restartBrowser(): Promise<void>;
|
|
17
17
|
clickAndWaitForPageToBeCreated(selector: string, page?: import("puppeteer").Page): Promise<void>;
|
|
18
18
|
closeLastPage(page?: import("puppeteer").Page): Promise<void>;
|
|
19
|
-
microsoftLogin(button: string, email: string, password: string): Promise<void>;
|
|
19
|
+
microsoftLogin(button: string, email: string, password: string, page?: import("puppeteer").Page): Promise<void>;
|
|
20
20
|
}
|
|
21
21
|
declare const _default: FunctionHelper;
|
|
22
22
|
export default _default;
|
|
@@ -156,7 +156,7 @@ export class FunctionHelper extends ExtendDefaultPage {
|
|
|
156
156
|
yield pages[pages.length - 1].close();
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
|
-
microsoftLogin(button, email, password) {
|
|
159
|
+
microsoftLogin(button, email, password, page = puppeteer.defaultPage) {
|
|
160
160
|
var _a;
|
|
161
161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
162
162
|
const email_input = 'input[type="email"]';
|
|
@@ -164,8 +164,8 @@ export class FunctionHelper extends ExtendDefaultPage {
|
|
|
164
164
|
const next_button = 'input[value="Next"]';
|
|
165
165
|
const sign_in_button = 'input[value="Sign in"]';
|
|
166
166
|
const no_button = 'input.ext-secondary';
|
|
167
|
-
yield this.clickAndWaitForPageToBeCreated(button);
|
|
168
|
-
const pages = yield
|
|
167
|
+
yield this.clickAndWaitForPageToBeCreated(button, page);
|
|
168
|
+
const pages = yield page.browser().pages();
|
|
169
169
|
const loginPage = pages[pages.length - 1];
|
|
170
170
|
yield this.extend_page_functions(loginPage);
|
|
171
171
|
yield loginPage.waitForNetworkIdle();
|
|
@@ -173,14 +173,14 @@ export class FunctionHelper extends ExtendDefaultPage {
|
|
|
173
173
|
yield loginPage.type(email_input, email, { delay: 0 });
|
|
174
174
|
yield loginPage.keyboard.press('Enter');
|
|
175
175
|
yield loginPage.waitForNetworkIdle();
|
|
176
|
-
let isWorkOrPersonalVisible = yield
|
|
176
|
+
let isWorkOrPersonalVisible = yield page.$('div.table');
|
|
177
177
|
if (!!isWorkOrPersonalVisible) {
|
|
178
|
-
yield (yield
|
|
178
|
+
yield (yield page.$$('div.table'))[0].click();
|
|
179
179
|
console.log('Then', 'I clicked Work or school account', StepStatus.PASSED);
|
|
180
|
-
yield
|
|
180
|
+
yield page.waitForNetworkIdle();
|
|
181
181
|
}
|
|
182
182
|
else {
|
|
183
|
-
yield
|
|
183
|
+
yield page.waitForNetworkIdle();
|
|
184
184
|
}
|
|
185
185
|
yield this.waitForSelector('visible', sign_in_button, 60000, loginPage);
|
|
186
186
|
yield this.waitForSelector('visible', password_input, 6000, loginPage);
|