diff --git a/lib/PuppeteerSharp.Tests/PuppeteerTests/AppModeTests.cs b/lib/PuppeteerSharp.Tests/PuppeteerTests/AppModeTests.cs new file mode 100644 index 000000000..cbbd7c64f --- /dev/null +++ b/lib/PuppeteerSharp.Tests/PuppeteerTests/AppModeTests.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Threading.Tasks; +using Xunit; +using Xunit.Abstractions; + +namespace PuppeteerSharp.Tests.PuppeteerTests +{ + [Collection("PuppeteerLoaderFixture collection")] + public class AppModeTests : PuppeteerBaseTest + { + public AppModeTests(ITestOutputHelper output) : base(output) { } + + [Fact] + public async Task ShouldWork() + { + var options = TestConstants.DefaultBrowserOptions(); + options.AppMode = true; + + using (var browser = await Puppeteer.LaunchAsync(options, TestConstants.ChromiumRevision, TestConstants.LoggerFactory)) + using (var page = await browser.NewPageAsync()) + { + Assert.Equal(121, await page.EvaluateExpressionAsync("11 * 11")); + } + } + } +} \ No newline at end of file diff --git a/lib/PuppeteerSharp/LaunchOptions.cs b/lib/PuppeteerSharp/LaunchOptions.cs index 5bd419ab6..78200449b 100644 --- a/lib/PuppeteerSharp/LaunchOptions.cs +++ b/lib/PuppeteerSharp/LaunchOptions.cs @@ -16,6 +16,10 @@ public class LaunchOptions : IBrowserOptions /// /// If set to true, sets Headless = false, otherwise, enables automation. /// + /// + /// AppMode won't neither add the argument '--remote-debugging-pipe' nor implement Pipes + /// due to limitations in .NET see + /// public bool AppMode { get; set; } /// @@ -73,4 +77,4 @@ public class LaunchOptions : IBrowserOptions /// public bool LogProcess { get; set; } } -} +} \ No newline at end of file