microsoft / PowerApps-TestEngine

MIT License
93 stars 28 forks source link

Not able to execute first test #296

Closed noviceazure closed 10 months ago

noviceazure commented 10 months ago

RUNNING TEST CASE: Case1

Attempting:

{ Screenshot("basicgallery_loaded.png"); Assert(Label1.Text = "Lorem ipsum 1", "Label should indicate first item in the gallery"); Select(Label1); Assert(Index(Gallery1.AllItems, 2).Title1.Text = "Lorem ipsum 2", "Validate the label in the 2nd row of the gallery"); Select(Index(Gallery1.AllItems, 2).NextArrow1); Assert(Label1.Text = "Lorem ipsum 2", "Label should be updated to indicate second item in the gallery"); // Using the test studio syntax to select gallery item Select(Gallery1, 2); Select(Gallery1, 3, NextArrow1); Assert(Label1.Text = "Lorem ipsum 3", "Label should be updated to indicate third item in the gallery"); // Using SetProperty to change the values on the controls SetProperty(Label1.Text, "End of the test"); SetProperty(Index(Gallery1.AllItems, 2).Title1.Text, "End of the test"); Assert(Index(Gallery1.AllItems, 2).Title1.Text = "End of the test", "Label in the gallery should be updated"); Screenshot("basicgallery_end.png"); }


Executing Screenshot function.

Successfully finished executing Screenshot function.

Run Javascript: PowerAppsTestEngine.getPropertyValue({"controlName":"Label1","index":null,"parentControl":null,"propertyName":"Text"}).then((propertyValue) => JSON.stringify(propertyValue))

[Error]: Encountered an error. See the debug log for this test case for more information.

System.AggregateException: One or more errors occurred. (0) ---> Microsoft.Playwright.PlaywrightException: 0 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 C:\POC\PowerAppsTest\src\Microsoft.PowerApps.TestEngine\TestInfra\PlaywrightTestInfraFunctions.cs:line 297 at Microsoft.PowerApps.TestEngine.PowerApps.PowerAppFunctions.GetPropertyValueFromControlAsync[T](ItemPath itemPath) in C:\POC\PowerAppsTest\src\Microsoft.PowerApps.TestEngine\PowerApps\PowerAppFunctions.cs:line 49 at Microsoft.PowerApps.TestEngine.PowerApps.PowerAppFunctions.GetPropertyValueFromControl[T](ItemPath itemPath) in C:\POC\PowerAppsTest\src\Microsoft.PowerApps.TestEngine\PowerApps\PowerAppFunctions.cs:line 64 at Microsoft.PowerApps.TestEngine.PowerApps.PowerFxModel.ControlRecordValue.TryGetField(FormulaType fieldType, String fieldName, FormulaValue& result) in C:\POC\PowerAppsTest\src\Microsoft.PowerApps.TestEngine\PowerApps\PowerFxModel\ControlRecordValue.cs:line 108 at Microsoft.PowerFx.Types.RecordValue.TryGetFieldAsync(FormulaType fieldType, String fieldName, CancellationToken cancellationToken) at Microsoft.PowerFx.Types.RecordValue.GetFieldAsync(FormulaType fieldType, String fieldName, CancellationToken cancellationToken) at Microsoft.PowerFx.EvalVisitor.Visit(RecordFieldAccessNode node, EvalVisitorContext context) at Microsoft.PowerFx.EvalVisitor.Visit(BinaryOpNode node, EvalVisitorContext context) at Microsoft.PowerFx.EvalVisitor.Visit(CallNode node, EvalVisitorContext context) at Microsoft.PowerFx.EvalVisitor.Visit(ChainingNode node, EvalVisitorContext context) at Microsoft.PowerFx.ParsedExpression.EvalAsync(CancellationToken cancellationToken, IRuntimeConfig runtimeConfig) at Microsoft.PowerFx.RecalcEngine.EvalAsync(String expressionText, CancellationToken cancellationToken, ParserOptions options, ReadOnlySymbolTable symbolTable, RuntimeConfig runtimeConfig) at Microsoft.PowerFx.RecalcEngine.EvalAsync(String expressionText, CancellationToken cancellationToken, RecordValue parameters, ParserOptions options) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at Microsoft.PowerFx.RecalcEngine.Eval(String expressionText, RecordValue parameters, ParserOptions options) at Microsoft.PowerApps.TestEngine.PowerFx.PowerFxEngine.Execute(String testSteps, CultureInfo culture) in C:\POC\PowerAppsTest\src\Microsoft.PowerApps.TestEngine\PowerFx\PowerFxEngine.cs:line 129 at Microsoft.PowerApps.TestEngine.PowerFx.PowerFxEngine.ExecuteWithRetryAsync(String testSteps, CultureInfo culture) in C:\POC\PowerAppsTest\src\Microsoft.PowerApps.TestEngine\PowerFx\PowerFxEngine.cs:line 70 at Microsoft.PowerApps.TestEngine.SingleTestRunner.RunTestAsync(String testRunId, String testRunDirectory, TestSuiteDefinition testSuiteDefinition, BrowserConfiguration browserConfig, String domain, String queryParams, CultureInfo locale) in C:\POC\PowerAppsTest\src\Microsoft.PowerApps.TestEngine\SingleTestRunner.cs:line 166

NavneetThekkumpat commented 10 months ago

If you are using the sample checked in the samples folder of this repo, please check the PowerApps version and let us know. We have made some improvements and fixes recently. Just wanted to make sure you have the latest updates and changes made. We are also working on updating our sample solutions checked in the repo soon.

noviceazure commented 10 months ago

Power app release version is 3.22064.18

NavneetThekkumpat commented 10 months ago

@noviceazure Looks like an older version. Please republish the app and run the tests again.