Skip to content

Commit

Permalink
Improved user name awaiting during login
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalFlow committed Jan 11, 2021
1 parent e6c09bb commit 1fe1d1d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/xrm/XrmUITest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,15 @@ export class XrmUiTest {
}

private async enterPassword(extendedProperties: OpenProperties) {
await Promise.race([
this.page.waitForSelector(D365Selectors.Login.password),
this.page.waitForNavigation({ waitUntil: "load", timeout: this.settings.timeout })
]);

const password = await this.page.$(D365Selectors.Login.password);

// For non online authentification, wait for custom login page to settle
if (!password) {
await this.page.waitForNavigation({ waitUntil: "load" });

console.log(`No online auth, handling custom auth. If nothing happens, please specify passwordFieldSelector and optionally userNameFieldSelector.`);

if (extendedProperties.userNameFieldSelector) {
Expand Down

0 comments on commit 1fe1d1d

Please sign in to comment.