utaylor
(Utah Taylor)
October 16, 2023, 2:53pm
21
Yeah I just keep getting this though when running dotnet run
warning CS8892: Method 'Program.Main()' will not be used as an entry point beca
use a synchronous entry point 'AutoGeneratedProgram.Main(string[])' was found. [C:\KineticTrace\KineticTestTrace.cs
proj]
utaylor
(Utah Taylor)
October 16, 2023, 2:53pm
22
The codegen gives us the code we need to update the .cs file with and then we also add the tracing part and then dotnet run runs that all yeah?
spaceage
(Chris)
October 16, 2023, 2:54pm
23
Did you add <GenerateProgramFile>false</GenerateProgramFile>
to the .csproject file? You want to add that in the <PropertyGroup>
section, Save, then re-build.
utaylor
(Utah Taylor)
October 16, 2023, 2:54pm
24
I need to do that to the .csproject fiele?
spaceage
(Chris)
October 16, 2023, 2:54pm
25
Thatâs what I had to do, yes
utaylor
(Utah Taylor)
October 16, 2023, 2:58pm
26
Okay⌠so now itâs running⌠but the webpage instantly closes
spaceage
(Chris)
October 16, 2023, 2:59pm
27
Did you modify your Program.cs to add the Headless: false
property? Iâm thinking if that isnât set and the default is true, youâre going to get a trace but you wonât see it happen.
utaylor
(Utah Taylor)
October 16, 2023, 3:00pm
28
using var playwright = await Playwright.CreateAsync();
await using var browser = await playwright.Chromium.LaunchAsync(new BrowserTypeLaunchOptions
{
Headless = false,
});
var context = await browser.NewContextAsync();
await context.Tracing.StartAsync(new()
{
Screenshots = true,
Snapshots = true,
Sources = true
});
var page = await context.NewPageAsync();
await page.GotoAsync("appservurl/environment/Apps/ERP/Home/");
await page.GotoAsync("appservurl/environment/Apps/ERP/Home/#/login?previousUrl=%2Fhome");
await context.Tracing.StopAsync(new()
{
Path = @"C:\KineticTestTrace\trace.zip"
});
}
Can you paste your Program.cs file here? Redact passwords first.
1 Like
utaylor
(Utah Taylor)
October 16, 2023, 3:01pm
30
Is it only tracing the await Go toAsync calls you are making? You canât mess around on the page like we did during codegen and get an output?
You need to add some work! It logged in and out. Thatâs all you had. Browse around for a when using CODEGEN.
Compare the number of commands I have and the file you posted. All youâre doing is logging in.
1 Like
utaylor
(Utah Taylor)
October 16, 2023, 3:02pm
32
Right on Mark. Itâs all coming togetherâŚ
utaylor
(Utah Taylor)
October 16, 2023, 3:04pm
33
Youâre dog gone right I am!
Computers. They do exactly what you tell them to do.
utaylor
(Utah Taylor)
October 16, 2023, 3:05pm
35
Was just having that convo with my CFO (former cobol programmer) last week!
utaylor
(Utah Taylor)
October 16, 2023, 3:31pm
36
Mark or @spaceage you ever get any timeouts? Like it canât actually follow the codegen?
Mine is getting hung up completing the script and timing outâŚ
spaceage
(Chris)
October 16, 2023, 3:35pm
37
I havenât, but Iâve really only tested logging in and running one of the apps weâre having customization issues with.
1 Like
utaylor
(Utah Taylor)
October 16, 2023, 3:39pm
38
Itâs all good I created some records up to the point where I now want to trace, instead of code gen-ing everything up to that point haha.
utaylor
(Utah Taylor)
October 16, 2023, 3:52pm
39
@Mark_Wonsil @spaceage check this fun out⌠I canât do a code gen on what I was hoping to do a codegen on because the name of the checkbox changes every time you click it?? So itâs impossible to re-trace???