Better Kinetic Tracing

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]

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?

Did you add <GenerateProgramFile>false</GenerateProgramFile> to the .csproject file? You want to add that in the <PropertyGroup> section, Save, then re-build.

I need to do that to the .csproject fiele?

That’s what I had to do, yes

Okay… so now it’s running… but the webpage instantly closes

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.

 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

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

Right on Mark. It’s all coming together…
Oh Yeah GIF by Jesse Ling

You’re dog gone right I am!

Computers. They do exactly what you tell them to do.

Pondering Season 9 GIF by The Office

Was just having that convo with my CFO (former cobol programmer) last week! :rofl:

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…

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

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.

@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???

Ooof…

1 Like