Closed gabo773 closed 1 year ago
Hey, Gabriel! Thank you for reaching out to us about this. Unfortunately, we're not currently supporting an organization-specific login flow, so TestEngine is sticking in that spot. TestEngine is waiting for a specific button to appear, and since you're on a page outside of the basic flow which does not contain that button, TestEngine is stuck waiting for it to appear.
I believe @jt000 mentioned this as well on another ticket, however you can modify this line to select your organization's sign in button instead, and that would work. If you go to your organization's login page manually, you can inspect that button in devtools in the browser to find the id of your button, and replace 'submit' with your button's id. Please let me know if this does/doesn't resolve the problem! Thank you!
HI Landon, thank you for the answer. I tried modifying the line with 'submit', 'submitButton', 'Login', 'Sign in', but still the same result. I don't understand why it doesn't press the button after it fills all the data.
This is the 'Sign in' button:
<div id="submissionArea" class="submitMargin"> <span id="submitButton" class="submit" tabindex="4" onkeypress="if (event && event.keyCode == 32) Login.submitLoginRequest();" onclick="return Login.submitLoginRequest();">Sign in</span> </div>
No worries, thanks for the reply! When changing the line to: await this.ClickAsync("input[type=\"submitButton\"]");
is the output video the same? Does it not show any different behavior?
Yes, everything is the same, logs and video. It goes into time out in the same spot.
I see; after changing that line of code to look for the correct selector, the program should find the 'sign-in' button and continue. Here's some more documentation on selectors: https://playwright.dev/dotnet/docs/selectors. We unfortunately don't support the organization-specific flow, but we're looking into working on this in the future!
I tried using the Locator selector to select and click the button but i get an error when trying the build. I assume this is also not supported at the moment.
// Submit password form await this.Locator("text = submitButton").ClickAsync();
Error message: `/Users/User/PowerApps-TestEngine/src/Microsoft.PowerApps.TestEngine/TestInfra/PlaywrightTestInfraFunctions.cs(332,32): error CS1061: 'PlaywrightTestInfraFunctions' does not contain a definition for 'Locator' and no accessible extension method 'Locator' accepting a first argument of type 'PlaywrightTestInfraFunctions' could be found (are you missing a using directive or an assembly reference?) [/Users/User/PowerApps-TestEngine/src/Microsoft.PowerApps.TestEngine/Microsoft.PowerApps.TestEngine.csproj]
The build failed. Fix the build errors and run again.`
I am trying to set up automation testing for our projects and I started with samples tests provided, starting with the basic gallery.
For sign in I am taken to the organization login page and the login goes into timeout.
debugLogs.txt
ae10575b97a223e805108b740663e62d.webm