Open kaidoatgit opened 1 year ago
@kaidoatgit would Install location vitualization work?
@kaidoatgit would Install location vitualization work?
Hello mate, I will give a try and research about it, thanks for your answer, i will give feedback as soon as possible
@kaidoatgit would Install location vitualization work?
Hello mate, I will give a try and research about it, thanks for your answer, i will give feedback as soon as possible
It does not work :(
Coolio. Thank you for trying my suggestion. Before I continue with suggestions I want to make sure I understand your problem.
What is the main issue? playwright can't be installed?
Coolio. Thank you for trying my suggestion. Before I continue with suggestions I want to make sure I understand your problem.
What is the main issue? playwright can't be installed?
Im currently deploying my MSIX Package, everything works perfect in localhost however when I install using the package itself some funcionalities of my WPF dont work. After some researches I found that all MSIX package are deployed into this super protected folder with read-only permissions: C:\Program Files\WindowsApps.
My problem is that im using a nugget package from Microsoft to install Microsoft.Playwright which is a tool to automate browser tasks. The following code installs the binaries for chromium browser:
var exitCode = Microsoft.Playwright.Program.Main(new[] { "install", "chromium" });
if (exitCode != 0)
{
output.Text += "Failed to install browsers" + Environment.NewLine;
}
However because of the super protected folder C:\Program Files\WindowsApps the code above does not work.
I've tried another approach that was to install the binaries manually and then use the following code to create the object to automate browser task:
using var playwright = await Playwright.CreateAsync();
await using var browser = await playwright.Chromium.LaunchAsync(new BrowserTypeLaunchOptions() { Headless = false });
await using var browserContext = await browser.NewContextAsync();
var page = await browserContext.NewPageAsync();
await page.GotoAsync(website_url);
await page.WaitForTimeoutAsync(10000f);
Even this way it still doesnt work. I did give permission myself to write on this super protected folder: C:\Program Files\WindowsApps and this is the only way that works, but this is a big NO, because this folder shouldnt be unsecured.
Hello,
Im currently trying to publish a desktop application that uses Microsoft Playwright to automate few task, however it seems that im missing something... So after creating a windows package project in visual studio to package my application (Publish > Create Package > ...) I ended up with an installer: The application installs correctly and all other dependencies such as API and Database are working correctly but Playwright is not working for some reason.
For testing purpose I've created a Mock project that has a simple button that calls playwright:
The package installation details: .NET CORE 6 Playwright package version: 1.27.2 Windows 10 x64
After the package is installed I run the application that looks like this:
When the Test button is pressed, the above code runs and this is the final output:
Playwright fails to install and therefore the launching/creation not working which I believe the exception is pointing to.
.playwright folder exist after installing my package
It seems I cant run/execute any kind of action in this folder C:\Program Files\WindowsApps ... which means that I cant install playwright, even if playwright is installed manually the app cant launch it... All MSIX (package installers generated by Visual studio) are installed in this particular folder with high security.
Any clue how to solve this problem without getting access to this folder? Clients shouldnt unsecure this folder
Thanks.
Note: I really want to install using MSIX because I want to upload my application into microsoft store