Code Monkey home page Code Monkey logo

Comments (5)

dhoehna avatar dhoehna commented on July 17, 2024

@kaidoatgit would Install location vitualization work?

from msix-packagesupportframework.

kaidoatgit avatar kaidoatgit commented on July 17, 2024

@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

from msix-packagesupportframework.

kaidoatgit avatar kaidoatgit commented on July 17, 2024

@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 :(

from msix-packagesupportframework.

dhoehna avatar dhoehna commented on July 17, 2024

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?

from msix-packagesupportframework.

kaidoatgit avatar kaidoatgit commented on July 17, 2024

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.

from msix-packagesupportframework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.