When start the pause sample using browser authentication, it successfully allows interactive login. However, it appears the test engine is not ready and needs to validate the login page has successfully closed and the application page has loaded first
Expected Behavior: Button clicker application opened and the Playwright Inspector shown
Actual Behavior: Receive error in log file for the test run
Microsoft.Playwright.PlaywrightException: Execution context was destroyed, most likely because of a navigation
at Microsoft.Playwright.Transport.Connection.InnerSendMessageToServerAsync[T](String guid, String method, Dictionary2 dictionary, Boolean keepNulls) in /_/src/Playwright/Transport/Connection.cs:line 191 at Microsoft.Playwright.Transport.Connection.WrapApiCallAsync[T](Func1 action, Boolean isInternal) in //src/Playwright/Transport/Connection.cs:line 513
at Microsoft.Playwright.Core.Frame.EvaluateAsync[T](String script, Object arg) in //src/Playwright/Core/Frame.cs:line 509
at Microsoft.PowerApps.TestEngine.TestInfra.PlaywrightTestInfraFunctions.RunJavascriptAsync[T](String jsExpression) in \PowerApps-TestEngine\src\Microsoft.PowerApps.TestEngine\TestInfra\PlaywrightTestInfraFunctions.cs:line 361
at Microsoft.PowerApps.TestEngine.Providers.PowerAppFunctions.GetPowerAppsTestEngineObject()
at Microsoft.PowerApps.TestEngine.Helpers.PollingHelper.PollAsync[T](T value, Func2 conditionToCheck, Func1 functionToCall, Int32 timeout, ILogger logger) in \PowerApps-TestEngine\src\Microsoft.PowerApps.TestEngine\Helpers\PollingHelper.cs:line 42
at Microsoft.PowerApps.TestEngine.Providers.PowerAppFunctions.CheckProviderAsync()
Run Javascript: typeof PowerAppsTestEngine.testEngineReady
Microsoft.Playwright.PlaywrightException: ReferenceError: PowerAppsTestEngine is not defined
at eval (eval at evaluate (:197:30), :1:1)
at eval ()
at UtilityScript.evaluate (:197:30)
at UtilityScript. (:1:44)
at Microsoft.Playwright.Transport.Connection.InnerSendMessageToServerAsync[T](String guid, String method, Dictionary2 dictionary, Boolean keepNulls) in /_/src/Playwright/Transport/Connection.cs:line 191 at Microsoft.Playwright.Transport.Connection.WrapApiCallAsync[T](Func1 action, Boolean isInternal) in //src/Playwright/Transport/Connection.cs:line 513
at Microsoft.Playwright.Core.Frame.EvaluateAsync[T](String script, Object arg) in //src/Playwright/Core/Frame.cs:line 509
at Microsoft.PowerApps.TestEngine.TestInfra.PlaywrightTestInfraFunctions.RunJavascriptAsync[T](String jsExpression) in \PowerApps-TestEngine\src\Microsoft.PowerApps.TestEngine\TestInfra\PlaywrightTestInfraFunctions.cs:line 361
at Microsoft.PowerApps.TestEngine.Providers.PowerAppFunctions.TestEngineReady()
[Error]: Encountered an error. See the debug log for this test suite for more information.
Describe the bug
When start the pause sample using browser authentication, it successfully allows interactive login. However, it appears the test engine is not ready and needs to validate the login page has successfully closed and the application page has loaded first
To Reproduce
Steps to reproduce the behavior:
dotnet PowerAppsTestEngine.dll -i ..\..\..\samples\pause\testPlan.fx.yaml
Expected Behavior: Button clicker application opened and the Playwright Inspector shown Actual Behavior: Receive error in log file for the test run
Microsoft.Playwright.PlaywrightException: Execution context was destroyed, most likely because of a navigation at Microsoft.Playwright.Transport.Connection.InnerSendMessageToServerAsync[T](String guid, String method, Dictionary
2 dictionary, Boolean keepNulls) in /_/src/Playwright/Transport/Connection.cs:line 191 at Microsoft.Playwright.Transport.Connection.WrapApiCallAsync[T](Func
1 action, Boolean isInternal) in //src/Playwright/Transport/Connection.cs:line 513 at Microsoft.Playwright.Core.Frame.EvaluateAsync[T](String script, Object arg) in //src/Playwright/Core/Frame.cs:line 509 at Microsoft.PowerApps.TestEngine.TestInfra.PlaywrightTestInfraFunctions.RunJavascriptAsync[T](String jsExpression) in \PowerApps-TestEngine\src\Microsoft.PowerApps.TestEngine\TestInfra\PlaywrightTestInfraFunctions.cs:line 361 at Microsoft.PowerApps.TestEngine.Providers.PowerAppFunctions.GetPowerAppsTestEngineObject() at Microsoft.PowerApps.TestEngine.Helpers.PollingHelper.PollAsync[T](T value, Func2 conditionToCheck, Func
1 functionToCall, Int32 timeout, ILogger logger) in \PowerApps-TestEngine\src\Microsoft.PowerApps.TestEngine\Helpers\PollingHelper.cs:line 42 at Microsoft.PowerApps.TestEngine.Providers.PowerAppFunctions.CheckProviderAsync()Run Javascript: typeof PowerAppsTestEngine.testEngineReady
Microsoft.Playwright.PlaywrightException: ReferenceError: PowerAppsTestEngine is not defined at eval (eval at evaluate (:197:30),:1:1)
at eval ()
at UtilityScript.evaluate (:197:30)
at UtilityScript. (:1:44)
at Microsoft.Playwright.Transport.Connection.InnerSendMessageToServerAsync[T](String guid, String method, Dictionary
2 dictionary, Boolean keepNulls) in /_/src/Playwright/Transport/Connection.cs:line 191 at Microsoft.Playwright.Transport.Connection.WrapApiCallAsync[T](Func
1 action, Boolean isInternal) in //src/Playwright/Transport/Connection.cs:line 513 at Microsoft.Playwright.Core.Frame.EvaluateAsync[T](String script, Object arg) in //src/Playwright/Core/Frame.cs:line 509 at Microsoft.PowerApps.TestEngine.TestInfra.PlaywrightTestInfraFunctions.RunJavascriptAsync[T](String jsExpression) in \PowerApps-TestEngine\src\Microsoft.PowerApps.TestEngine\TestInfra\PlaywrightTestInfraFunctions.cs:line 361 at Microsoft.PowerApps.TestEngine.Providers.PowerAppFunctions.TestEngineReady()[Error]: Encountered an error. See the debug log for this test suite for more information.
Additional context