Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

SetProperty() and Assert() does not work with controls inside EditForm

Aperta
#674 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
csharp, playwright
Ambito
testing-qa

Direzione di ricerca

Inizia con SetPropertyFunction.cs e PowerAppFunctions.cs, seguendo il percorso non riuscito di SetPropertyDateAsync fino a PlaywrightTestInfraFunctions.cs. Riproduci il problema con il file testPlan.yaml e l’archivio dell’app allegati, quindi confronta il comportamento dei controlli all’interno e all’esterno di un EditForm. Il lavoro è completato quando Assert e SetProperty funzionano per i controlli DataCardValue senza l’eccezione segnalata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

new

Describe the bug

In case I try to use Assert() or SetProperty() functions on a control that is inside a Form, Test Engine throws an error: "System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation."

In Test Sudio, it works well.

If I make a copy of the control outside the form, Assert and SetProperty works well.

To Reproduce

Steps to reproduce the behavior:

  1. Create a canvas app and place an Edit Form control on it
  2. Set up a proper data source, add some datacards
  3. Configure your test plan, create a test case that tries Assert or SetProperty on any of the DataCardValue controls

Expected Behavior: Provided value is set or asserted
Actual Behavior: Engine throws an error and test execution fails

Additional context

testPlan.yaml

TestEngineApp_20260401141554.zip

Log details:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.AggregateException: One or more errors occurred. (0)
---> Microsoft.Playwright.PlaywrightException: 0
at Microsoft.Playwright.Transport.Connection.InnerSendMessageToServerAsync[T](ChannelOwner object, String method, Dictionary2 dictionary, Boolean keepNulls) in /_/src/Playwright/Transport/Connection.cs:line 201 at Microsoft.Playwright.Transport.Connection.WrapApiCallAsync[T](Func1 action, Boolean isInternal, String title) in //src/Playwright/Transport/Connection.cs:line 499
at Microsoft.Playwright.Core.Frame.EvaluateAsync[T](String script, Object arg) in /
/src/Playwright/Core/Frame.cs:line 714
at Microsoft.PowerApps.TestEngine.TestInfra.PlaywrightTestInfraFunctions.RunJavascriptAsync[T](String jsExpression) in C:\Users\antalb\Documents\PaTest\PowerApps-TestEngine\src\Microsoft.PowerApps.TestEngine\TestInfra\PlaywrightTestInfraFunctions.cs:line 493
at Microsoft.PowerApps.TestEngine.Providers.PowerAppFunctions.SetPropertyDateAsync(ItemPath itemPath, DateValue value) in C:\Users\antalb\Documents\PaTest\PowerApps-TestEngine\src\testengine.provider.canvas\PowerAppFunctions.cs:line 317
at Microsoft.PowerApps.TestEngine.Providers.PowerAppFunctions.SetPropertyAsync(ItemPath itemPath, FormulaValue value) in C:\Users\antalb\Documents\PaTest\PowerApps-TestEngine\src\testengine.provider.canvas\PowerAppFunctions.cs:line 283
at Microsoft.PowerApps.TestEngine.PowerFx.Functions.SetPropertyFunction.SetProperty(RecordValue obj, StringValue propName, FormulaValue value) in C:\Users\antalb\Documents\PaTest\PowerApps-TestEngine\src\Microsoft.PowerApps.TestEngine\PowerFx\Functions\SetPropertyFunction.cs:line 44
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at Microsoft.PowerApps.TestEngine.PowerFx.Functions.SetPropertyFunction.Execute(RecordValue obj, StringValue propName, FormulaValue value) in C:\Users\antalb\Documents\PaTest\PowerApps-TestEngine\src\Microsoft.PowerApps.TestEngine\PowerFx\Functions\SetPropertyFunction.cs:line 32
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span1 copyOfArgs, BindingFlags invokeAttr) --- End of inner exception stack trace --- at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span1 copyOfArgs, BindingFlags invokeAttr)
at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Microsoft.PowerFx.ReflectionFunction.InvokeAsync(IServiceProvider serviceProvider, IReadOnlyList`1 args, CancellationToken cancellationToken)
at Microsoft.PowerFx.CustomSetPropertyFunction.InvokeAsync(FormulaValue[] args, CancellationToken cancellationToken)
at Microsoft.PowerFx.EvalVisitor.TryHandleSetProperty(CallNode node, EvalVisitorContext context)
at Microsoft.PowerFx.EvalVisitor.Visit(CallNode 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.PowerApps.TestEngine.PowerFx.PowerFxEngine.ExecuteAsync(String testSteps, CultureInfo culture) in C:\Users\antalb\Documents\PaTest\PowerApps-TestEngine\src\Microsoft.PowerApps.TestEngine\PowerFx\PowerFxEngine.cs:line 480
at Microsoft.PowerApps.TestEngine.PowerFx.PowerFxEngine.ExecuteWithRetryAsync(String testSteps, CultureInfo culture) in C:\Users\antalb\Documents\PaTest\PowerApps-TestEngine\src\Microsoft.PowerApps.TestEngine\PowerFx\PowerFxEngine.cs:line 400
at Microsoft.PowerApps.TestEngine.SingleTestRunner.RunTestAsync(String testRunId, String testRunDirectory, TestSuiteDefinition testSuiteDefinition, BrowserConfiguration browserConfig, String domain, String queryParams, CultureInfo locale) in C:\Users\antalb\Documents\PaTest\PowerApps-TestEngine\src\Microsoft.PowerApps.TestEngine\SingleTestRunner.cs:line 264

Lingua principale
C#
Stelle
150
Fork
56
Merge medio
1h 18m
PR unite (30g)
1

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/PowerApps-TestEngine

Tutte le issue di microsoft/PowerApps-TestEngine

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.