├── .editorconfig ├── .gitattributes ├── .github ├── FUNDING.yml └── workflows │ ├── PushNugetPackageToIntNugetOrg.yml │ ├── PushNugetPackageToNugetOrg.yml │ ├── demo.yml │ ├── dotnet.yml │ ├── on-push-do-docs.yml │ ├── publish-docs.yml │ └── sponsors-in-readme.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Directory.Build.props ├── ISSUE_TEMPLATE.md ├── LICENSE ├── README.md ├── demos ├── PuppeteerSharpDemos-Local.sln ├── PuppeteerSharpDemos.sln └── PuppeteerSharpPdfDemo │ ├── Program.cs │ ├── PuppeteerSharpPdfDemo-Local.csproj │ └── PuppeteerSharpPdfDemo.csproj ├── docfx_project ├── .gitignore ├── api │ ├── .gitignore │ └── index.md ├── docfx.json ├── docs │ ├── AOT.md │ ├── ChromeExtension.md │ ├── DownloadFetcher.Download.md │ ├── IssuesGeneratingPdfFiles.md │ ├── LogCDPCommunication.md │ ├── Page.EvaluateExpressionAsync.GetAllLinks.md │ ├── Page.EvaluateFunctionAsync.ComplexJSObjects.md │ ├── Page.Request.md │ ├── Page.ScreenshotAsync.md │ ├── Page.WaitForFunctionAsync.md │ ├── Page.WaitForSelectorAsync.Searching.md │ ├── ReuseChrome.md │ ├── index.md │ └── toc.yml ├── index.md ├── readme.md ├── templates │ ├── .editorconfig │ ├── .eslintrc.js │ ├── .gitignore │ ├── .stylelintrc.json │ ├── README.md │ ├── build.js │ ├── common │ │ ├── ManagedReference.common.js │ │ ├── RestApi.common.js │ │ ├── UniversalReference.common.js │ │ ├── common.js │ │ └── partials │ │ │ ├── classSubtitle.tmpl.partial │ │ │ └── namespaceSubtitle.tmpl.partial │ ├── custom │ │ ├── ManagedReference.common.js │ │ ├── conceptual.html.primary.js │ │ ├── logo.svg │ │ ├── partials │ │ │ └── class.header.tmpl.partial │ │ └── token.json │ ├── default │ │ ├── ManagedReference.extension.js │ │ ├── ManagedReference.html.primary.js │ │ ├── ManagedReference.html.primary.tmpl │ │ ├── Redirection.html.primary.tmpl │ │ ├── RestApi.extension.js │ │ ├── RestApi.html.primary.js │ │ ├── RestApi.html.primary.tmpl │ │ ├── UniversalReference.extension.js │ │ ├── UniversalReference.html.primary.js │ │ ├── UniversalReference.html.primary.tmpl │ │ ├── conceptual.extension.js │ │ ├── conceptual.html.primary.js │ │ ├── conceptual.html.primary.tmpl │ │ ├── favicon.ico │ │ ├── layout │ │ │ └── _master.tmpl │ │ ├── logo.svg │ │ ├── partials │ │ │ ├── affix.tmpl.partial │ │ │ ├── breadcrumb.tmpl.partial │ │ │ ├── class.header.tmpl.partial │ │ │ ├── class.memberpage.tmpl.partial │ │ │ ├── class.tmpl.partial │ │ │ ├── collection.tmpl.partial │ │ │ ├── customMREFContent.tmpl.partial │ │ │ ├── dd-li.tmpl.partial │ │ │ ├── enum.tmpl.partial │ │ │ ├── footer.tmpl.partial │ │ │ ├── head.tmpl.partial │ │ │ ├── item.tmpl.partial │ │ │ ├── li.tmpl.partial │ │ │ ├── logo.tmpl.partial │ │ │ ├── namespace.tmpl.partial │ │ │ ├── navbar.tmpl.partial │ │ │ ├── rest.child.tmpl.partial │ │ │ ├── rest.definition.tmpl.partial │ │ │ ├── rest.tmpl.partial │ │ │ ├── scripts.tmpl.partial │ │ │ ├── searchResults.tmpl.partial │ │ │ ├── title.tmpl.partial │ │ │ ├── toc.tmpl.partial │ │ │ └── uref │ │ │ │ ├── class.header.tmpl.partial │ │ │ │ ├── class.tmpl.partial │ │ │ │ ├── enum.tmpl.partial │ │ │ │ ├── inheritance.tmpl.partial │ │ │ │ ├── namespace.tmpl.partial │ │ │ │ └── parameters.tmpl.partial │ │ ├── search-stopwords.json │ │ ├── src │ │ │ ├── docfx.vendor.js │ │ │ └── search-worker.js │ │ ├── styles │ │ │ ├── docfx.css │ │ │ ├── docfx.js │ │ │ ├── main.css │ │ │ └── main.js │ │ ├── toc.extension.js │ │ ├── toc.html.primary.js │ │ ├── toc.html.primary.tmpl │ │ ├── toc.json.js │ │ ├── toc.json.tmpl │ │ └── token.json │ ├── jest.config.js │ ├── modern │ │ ├── ApiPage.html.primary.js │ │ ├── ApiPage.html.primary.tmpl │ │ ├── layout │ │ │ └── _master.tmpl │ │ ├── partials │ │ │ ├── class.header.tmpl.partial │ │ │ ├── class.memberpage.tmpl.partial │ │ │ ├── class.tmpl.partial │ │ │ ├── collection.tmpl.partial │ │ │ ├── customMREFContent.tmpl.partial │ │ │ ├── enum.tmpl.partial │ │ │ ├── item.tmpl.partial │ │ │ └── namespace.tmpl.partial │ │ ├── public │ │ │ ├── main.css │ │ │ └── main.js │ │ └── src │ │ │ ├── docfx.scss │ │ │ ├── docfx.ts │ │ │ ├── dotnet.scss │ │ │ ├── helper.test.ts │ │ │ ├── helper.ts │ │ │ ├── highlight.scss │ │ │ ├── highlight.ts │ │ │ ├── layout.scss │ │ │ ├── main.js │ │ │ ├── markdown.scss │ │ │ ├── markdown.ts │ │ │ ├── mixins.scss │ │ │ ├── nav.scss │ │ │ ├── nav.ts │ │ │ ├── options.d.ts │ │ │ ├── search-worker.ts │ │ │ ├── search.scss │ │ │ ├── search.ts │ │ │ ├── theme.ts │ │ │ ├── toc.scss │ │ │ └── toc.ts │ ├── package-lock.json │ ├── package.json │ ├── statictoc │ │ ├── ManagedReference.html.primary.js │ │ ├── RestApi.html.primary.js │ │ ├── UniversalReference.html.primary.js │ │ ├── conceptual.html.primary.js │ │ ├── partials │ │ │ ├── dd-li.tmpl.partial │ │ │ ├── li.tmpl.partial │ │ │ ├── navbar-li.tmpl.partial │ │ │ ├── navbar.tmpl.partial │ │ │ └── toc.tmpl.partial │ │ ├── statictoc.util.js │ │ └── toc.tmpl.js │ └── tsconfig.json └── toc.yml ├── lib ├── .editorconfig ├── Common │ └── CommonProps.props ├── PuppeteerSharp.AspNetFramework.sln ├── PuppeteerSharp.AspNetFramework │ ├── AspNetWebSocketTransport.cs │ └── PuppeteerSharp.AspNetFramework.csproj ├── PuppeteerSharp.DevicesFetcher │ ├── .editorconfig │ ├── Device.cs │ ├── Program.cs │ ├── PuppeteerSharp.DevicesFetcher.csproj │ └── ViewPort.cs ├── PuppeteerSharp.Nunit │ ├── PuppeteerSharp.Nunit.csproj │ ├── PuppeteerTestAttribute.cs │ └── TestExpectations │ │ ├── TestExpectation.cs │ │ ├── TestExpectations.local.json │ │ └── TestExpectations.upstream.json ├── PuppeteerSharp.TestServer │ ├── .editorconfig │ ├── PuppeteerSharp.TestServer.csproj │ ├── SimpleCompressionMiddleware.cs │ ├── SimpleServer.cs │ └── wwwroot │ │ ├── beforeunload.html │ │ ├── cached │ │ ├── bfcache │ │ │ ├── index.html │ │ │ ├── target.html │ │ │ ├── worker-iframe-container.html │ │ │ ├── worker-iframe.html │ │ │ └── worker.mjs │ │ ├── one-style-font.css │ │ ├── one-style-font.html │ │ ├── one-style.css │ │ └── one-style.html │ │ ├── chromium-linux.zip │ │ ├── consolelog.html │ │ ├── csp.html │ │ ├── csscoverage │ │ ├── Dosis-Regular.ttf │ │ ├── OFL.txt │ │ ├── involved.html │ │ ├── media.html │ │ ├── multiple.html │ │ ├── simple.html │ │ ├── sourceurl.html │ │ ├── stylesheet1.css │ │ ├── stylesheet2.css │ │ └── unused.html │ │ ├── detect-touch.html │ │ ├── digits │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ ├── 7.png │ │ ├── 8.png │ │ └── 9.png │ │ ├── dynamic-oopif.html │ │ ├── empty.html │ │ ├── error.html │ │ ├── es6 │ │ ├── .eslintrc │ │ ├── es6import.js │ │ ├── es6module.js │ │ └── es6pathimport.js │ │ ├── favicon.ico │ │ ├── file-to-upload.txt │ │ ├── firefox.zip │ │ ├── frame-example.html │ │ ├── frames │ │ ├── frame.html │ │ ├── frameset.html │ │ ├── nested-frames.html │ │ ├── one-frame-url-fragment.html │ │ ├── one-frame.html │ │ ├── script.js │ │ ├── style.css │ │ └── two-frames.html │ │ ├── global-var.html │ │ ├── grid.html │ │ ├── historyapi.html │ │ ├── idle-detector.html │ │ ├── injectedfile.js │ │ ├── injectedstyle.css │ │ ├── inline-svg.html │ │ ├── inner-frame1.html │ │ ├── inner-frame2.html │ │ ├── input │ │ ├── button.html │ │ ├── checkbox.html │ │ ├── drag-and-drop.html │ │ ├── fileupload.html │ │ ├── keyboard.html │ │ ├── mouse-helper.js │ │ ├── rotatedButton.html │ │ ├── scrollable.html │ │ ├── select.html │ │ ├── textarea.html │ │ ├── touchscreen.html │ │ └── wheel.html │ │ ├── jscoverage │ │ ├── eval.html │ │ ├── involved.html │ │ ├── multiple.html │ │ ├── ranges.html │ │ ├── script1.js │ │ ├── script2.js │ │ ├── simple.html │ │ ├── sourceurl.html │ │ └── unused.html │ │ ├── lazy-oopif-frame.html │ │ ├── localhost.conf │ │ ├── lone-surrogate.html │ │ ├── longText.html │ │ ├── main-frame.html │ │ ├── mobile.html │ │ ├── modernizr.js │ │ ├── networkidle.html │ │ ├── offscreenbuttons.html │ │ ├── one-style.css │ │ ├── one-style.html │ │ ├── oopif.html │ │ ├── pdf.html │ │ ├── picture.html │ │ ├── playground.html │ │ ├── popup │ │ ├── popup.html │ │ └── window-open.html │ │ ├── pptr.png │ │ ├── prerender │ │ ├── index.html │ │ └── target.html │ │ ├── resetcss.html │ │ ├── resolution.html │ │ ├── self-request.html │ │ ├── serviceworkers │ │ ├── empty │ │ │ ├── sw.html │ │ │ └── sw.js │ │ └── fetch │ │ │ ├── style.css │ │ │ ├── sw.html │ │ │ └── sw.js │ │ ├── shadow.html │ │ ├── simple.json │ │ ├── sw.js │ │ ├── tamperable.html │ │ ├── title.html │ │ ├── worker │ │ ├── worker.html │ │ └── worker.js │ │ └── wrappedlink.html ├── PuppeteerSharp.Tests.DumpIO │ ├── .editorconfig │ ├── Program.cs │ └── PuppeteerSharp.Tests.DumpIO.csproj ├── PuppeteerSharp.Tests.SingleFileDeployment │ ├── .editorconfig │ ├── Program.cs │ └── PuppeteerSharp.Tests.SingleFileDeployment.csproj ├── PuppeteerSharp.Tests │ ├── .editorconfig │ ├── AccessibilityTests │ │ ├── AccessibilityTests.cs │ │ └── RootOptionTests.cs │ ├── AriaQueryHandlerTests │ │ ├── ParseAriaSelectorTests.cs │ │ ├── QueryAllArrayTests.cs │ │ ├── QueryAllTests.cs │ │ ├── QueryOneTests.cs │ │ └── WaitForSelectorAriaTests.cs │ ├── Assets │ │ ├── es6 │ │ │ ├── es6import.js │ │ │ ├── es6module.js │ │ │ └── es6pathimport.js │ │ ├── file-to-upload.txt │ │ ├── injectedfile.js │ │ ├── injectedstyle.css │ │ ├── one-style.css │ │ ├── one-style.html │ │ ├── pptr.png │ │ └── simple-extension │ │ │ ├── content-script.js │ │ │ ├── index.js │ │ │ └── manifest.json │ ├── BFCacheTests │ │ └── BFCacheTests.cs │ ├── BrowserContextTests │ │ ├── BrowserContextOverridePermissionsTests.cs │ │ ├── BrowserContextTests.cs │ │ └── DefaultBrowserContextTests.cs │ ├── BrowserTests │ │ ├── BrowserVersionTests.cs │ │ ├── IsConnectedTests.cs │ │ ├── ProcessTests.cs │ │ ├── TargetTests.cs │ │ └── UserAgentTests.cs │ ├── Browsers │ │ ├── Chrome │ │ │ ├── ChromeDataTests.cs │ │ │ └── CliTests.cs │ │ ├── Chromium │ │ │ └── ChromiumDataTests.cs │ │ └── Firefox │ │ │ ├── CliTests.cs │ │ │ └── FirefoxDataTests.cs │ ├── CDPSessionTests │ │ └── CreateCDPSessionTests.cs │ ├── ChromeLauncherTests │ │ ├── GetFeaturesTests.cs │ │ └── RemoveMatchingFlagsTests.cs │ ├── ChromiumOnlyTests │ │ ├── BrowserUrlOptionTests.cs │ │ └── PageTests.cs │ ├── ClickTests │ │ └── ClickTests.cs │ ├── CookiesTests │ │ ├── CookiesTests.cs │ │ ├── DeleteCookiesTests.cs │ │ └── SetCookiesTests.cs │ ├── CoverageTests │ │ ├── CSSCoverageTests.cs │ │ ├── CSSResetOnNavigationTests.cs │ │ ├── IncludeRawScriptCoverageTests.cs │ │ ├── JSCoverageTests.cs │ │ └── JSResetOnNavigationTests.cs │ ├── DeviceRequestPromptTests │ │ ├── DeviceRequestPromptCancelTests.cs │ │ ├── DeviceRequestPromptDevicesTests.cs │ │ ├── DeviceRequestPromptSelectTests.cs │ │ ├── DeviceRequestPromptWaitForDeviceTests.cs │ │ ├── MockCDPSession.cs │ │ ├── PromptDataConverter.cs │ │ └── WaitForDevicePromptTests.cs │ ├── DevtoolsTests │ │ └── DevtoolsTests.cs │ ├── DialogTests │ │ └── DialogTests.cs │ ├── DragAndDropTests │ │ ├── DragAndDropTests.cs │ │ └── LegacyDragAndDropTests.cs │ ├── ElementHandleTests │ │ ├── BoundingBoxTests.cs │ │ ├── BoxModelTests.cs │ │ ├── ClickTests.cs │ │ ├── ContentFrameTests.cs │ │ ├── CustomQueriesTests.cs │ │ ├── HoverTests.cs │ │ ├── IsIntersectingViewportTests.cs │ │ └── IsVisibleIsHiddenTests.cs │ ├── EmulationTests │ │ ├── EmulateMediaFeaturesTests.cs │ │ ├── EmulateMediaTypeTests.cs │ │ ├── EmulateTests.cs │ │ ├── EmulateTimezoneTests.cs │ │ ├── PageEmulateCPUThrottlingTests.cs │ │ ├── PageEmulateNetworkConditionsTests.cs │ │ ├── PageEmulateVisionDeficiencyTests.cs │ │ └── PageViewPortTests.cs │ ├── EvaluationTests │ │ ├── FrameEvaluateTests.cs │ │ ├── PageEvaluateOnNewDocumentTests.cs │ │ ├── PageEvaluateTests.cs │ │ └── RemoveScriptToEvaluateOnNewDocumentTests.cs │ ├── ExtensionsTests │ │ └── ExtensionsTests.cs │ ├── FixturesTests │ │ └── FixturesTests.cs │ ├── FrameTests │ │ ├── EvaluateHandleTests.cs │ │ ├── FrameEvaluateTests.cs │ │ └── FrameManagementTests.cs │ ├── FrameUtils.cs │ ├── HeadfulTests │ │ └── HeadfulTests.cs │ ├── IdleOverrideTests │ │ └── IdleOverrideTests.cs │ ├── IgnoreHttpsErrorsTests │ │ ├── AcceptInsecureCertsTests.cs │ │ └── ResponseSecurityDetailsTests.cs │ ├── InjectedTests │ │ └── InjectedTests.cs │ ├── InputTests │ │ ├── FileChooserAcceptTests.cs │ │ ├── FileChooserCancelTests.cs │ │ ├── FileChooserIsMultipleTests.cs │ │ ├── InputTests.cs │ │ └── PageWaitForFileChooserTests.cs │ ├── Issues │ │ ├── Issue 2251.cs │ │ ├── Issue0100.cs │ │ ├── Issue0128.cs │ │ ├── Issue0343.cs │ │ ├── Issue0616.cs │ │ ├── Issue0648.cs │ │ ├── Issue0764.cs │ │ ├── Issue1354.cs │ │ ├── Issue1447.cs │ │ ├── Issue1878.cs │ │ └── Issue1895.cs │ ├── JSHandleTests │ │ ├── AsElementTests.cs │ │ ├── ClickablePointTests.cs │ │ ├── GetPropertiesTests.cs │ │ ├── GetPropertyTests.cs │ │ ├── JsonValueTests.cs │ │ ├── PageEvaluateHandle.cs │ │ └── ToStringTests.cs │ ├── KeyboardTests │ │ └── KeyboardTests.cs │ ├── LaunchOptionsTests.cs │ ├── LauncherTests │ │ ├── BrowserCloseTests.cs │ │ ├── BrowserDisconnectTests.cs │ │ ├── BrowserEventsDisconnectedTests.cs │ │ ├── BrowserTargetEventsTests.cs │ │ ├── PuppeteerConnectTests.cs │ │ └── PuppeteerLaunchTests.cs │ ├── MouseTests │ │ ├── Dimensions.cs │ │ └── MouseTests.cs │ ├── NavigationTests │ │ ├── FrameGoToTests.cs │ │ ├── FrameWaitForNavigationTests.cs │ │ ├── PageGoBackTests.cs │ │ ├── PageGotoTests.cs │ │ ├── PageReloadTests.cs │ │ └── PageWaitForNavigationTests.cs │ ├── NetworkManagerTests │ │ └── NetworkManagerTests.cs │ ├── NetworkTests │ │ ├── NetworkEventTests.cs │ │ ├── PageAuthenticateTests.cs │ │ ├── PageEventRequestTests.cs │ │ ├── PageSetBypassServiceWorkerTests.cs │ │ ├── PageSetExtraHttpHeadersTests.cs │ │ ├── RequestFrameTests.cs │ │ ├── RequestHeadersTests.cs │ │ ├── RequestIsNavigationRequestTests.cs │ │ ├── RequestPostDataTests.cs │ │ ├── ResponseBufferTests.cs │ │ ├── ResponseFromCacheTests.cs │ │ ├── ResponseFromServiceWorkerTests.cs │ │ ├── ResponseHeadersTests.cs │ │ ├── ResponseJsonTests.cs │ │ ├── ResponseStatusTextTests.cs │ │ └── ResponseTextTests.cs │ ├── OOPIFTests │ │ └── OOPIFTests.cs │ ├── PageExtensions.cs │ ├── PageTests │ │ ├── AddScriptTagTests.cs │ │ ├── AddStyleTagTests.cs │ │ ├── BrowserContextTests.cs │ │ ├── BrowserTests.cs │ │ ├── CloseTests.cs │ │ ├── ExposeFunctionTests.cs │ │ ├── GeolocationTests.cs │ │ ├── GetContentTests.cs │ │ ├── MetricsTests.cs │ │ ├── OfflineModeTests.cs │ │ ├── PageBringToFrontTests.cs │ │ ├── PageEventsCloseTests.cs │ │ ├── PageEventsConsoleTests.cs │ │ ├── PageEventsDOMContentLoadedTests.cs │ │ ├── PageEventsErrorTests.cs │ │ ├── PageEventsLoadTests.cs │ │ ├── PageEventsPageErrorTests.cs │ │ ├── PageEventsPopupTests.cs │ │ ├── PdfTests.cs │ │ ├── RemoveExposedFunctionTests.cs │ │ ├── SelectTests.cs │ │ ├── SetBypassCSPTests.cs │ │ ├── SetCacheEnabledTests.cs │ │ ├── SetContentTests.cs │ │ ├── SetJavaScriptEnabledTests.cs │ │ ├── SetUserAgentTests.cs │ │ ├── TitleTests.cs │ │ ├── UrlTests.cs │ │ ├── WaitForNetworkIdleTests.cs │ │ ├── WaitForRequestTests.cs │ │ └── WaitForResponseTests.cs │ ├── PollerInterceptor.cs │ ├── PrerenderTests │ │ ├── PrerenderTests.cs │ │ ├── ViaFrameTests.cs │ │ ├── WithEmulationTests.cs │ │ └── WithNetworkRequestsTests.cs │ ├── PublishSingleFileTests │ │ └── PublishSingleFileTests.cs │ ├── PuppeteerBaseTest.cs │ ├── PuppeteerBrowserBaseTest.cs │ ├── PuppeteerBrowserContextBaseTest.cs │ ├── PuppeteerPageBaseTest.cs │ ├── PuppeteerSharp.Tests.csproj │ ├── QueryHandlerTests │ │ ├── PierceSelectorTests.cs │ │ └── TextSelectorTests │ │ │ ├── TextSelectorInElementHandlesTests.cs │ │ │ └── TextSelectorInPageTests.cs │ ├── QueryObjectsTests │ │ └── QueryObjectsTests.cs │ ├── QuerySelectorTests │ │ ├── ElementHandleQuerySelectorAllEvalTests.cs │ │ ├── ElementHandleQuerySelectorAllTests.cs │ │ ├── ElementHandleQuerySelectorEvalTests.cs │ │ ├── ElementHandleQuerySelectorTests.cs │ │ ├── PageQuerySelectorAllEvalTests.cs │ │ ├── PageQuerySelectorAllTests.cs │ │ ├── PageQuerySelectorEvalTests.cs │ │ ├── PageQuerySelectorTests.cs │ │ └── QueryAllTests.cs │ ├── RequestInterceptionExperimentalTests │ │ ├── PageSetRequestInterceptionTests.cs │ │ ├── RequestContinueTests.cs │ │ └── RequestRespondTests.cs │ ├── RequestInterceptionTests │ │ ├── RequestContinueTests.cs │ │ ├── RequestRespondTests.cs │ │ └── SetRequestInterceptionTests.cs │ ├── ScreenshotHelper.cs │ ├── ScreenshotTests │ │ ├── ElementHandleScreenshotTests.cs │ │ └── PageScreenshotTests.cs │ ├── Screenshots │ │ ├── golden-chromium │ │ │ ├── 0.png │ │ │ ├── csscoverage-involved.txt │ │ │ ├── device-pixel-ratio1.png │ │ │ ├── device-pixel-ratio2.png │ │ │ ├── device-pixel-ratio3.png │ │ │ ├── grid-cell-0.png │ │ │ ├── grid-cell-1.png │ │ │ ├── grid-cell-2.png │ │ │ ├── grid-cell-3.png │ │ │ ├── jscoverage-involved.txt │ │ │ ├── mock-binary-response.png │ │ │ ├── screenshot-clip-odd-size.png │ │ │ ├── screenshot-clip-rect-scale.png │ │ │ ├── screenshot-clip-rect-scale2.png │ │ │ ├── screenshot-clip-rect.png │ │ │ ├── screenshot-element-bounding-box.png │ │ │ ├── screenshot-element-fractional-offset.png │ │ │ ├── screenshot-element-fractional.png │ │ │ ├── screenshot-element-larger-than-viewport.png │ │ │ ├── screenshot-element-padding-border.png │ │ │ ├── screenshot-element-rotate.png │ │ │ ├── screenshot-element-scrolled-into-view.png │ │ │ ├── screenshot-grid-fullpage.png │ │ │ ├── screenshot-offscreen-clip.png │ │ │ ├── screenshot-sanity.png │ │ │ ├── test.png │ │ │ ├── transparent.png │ │ │ ├── vision-deficiency-achromatopsia.png │ │ │ ├── vision-deficiency-blurredVision.png │ │ │ ├── vision-deficiency-deuteranopia.png │ │ │ ├── vision-deficiency-protanopia.png │ │ │ ├── vision-deficiency-tritanopia.png │ │ │ └── white.jpg │ │ ├── golden-firefox │ │ │ ├── 0.png │ │ │ ├── device-pixel-ratio1.png │ │ │ ├── device-pixel-ratio2.png │ │ │ ├── device-pixel-ratio3.png │ │ │ ├── grid-cell-0.png │ │ │ ├── grid-cell-1.png │ │ │ ├── screenshot-clip-odd-size.png │ │ │ ├── screenshot-clip-rect-scale.png │ │ │ ├── screenshot-clip-rect-scale2.png │ │ │ ├── screenshot-clip-rect.png │ │ │ ├── screenshot-element-bounding-box.png │ │ │ ├── screenshot-element-fractional-offset.png │ │ │ ├── screenshot-element-fractional.png │ │ │ ├── screenshot-element-larger-than-viewport.png │ │ │ ├── screenshot-element-padding-border.png │ │ │ ├── screenshot-element-rotate.png │ │ │ ├── screenshot-element-scrolled-into-view.png │ │ │ ├── screenshot-grid-fullpage-2.png │ │ │ ├── screenshot-grid-fullpage.png │ │ │ ├── screenshot-offscreen-clip-2.png │ │ │ ├── screenshot-offscreen-clip.png │ │ │ ├── screenshot-sanity.png │ │ │ ├── transparent.png │ │ │ └── white.jpg │ │ ├── nested-frames.txt │ │ └── reconnect-nested-frames.txt │ ├── TargetManagerTests │ │ └── TargetManagerTests.cs │ ├── TargetTests │ │ ├── BrowserWaitForTargetTests.cs │ │ └── TargetTests.cs │ ├── TestConstants.cs │ ├── TestServerSetup.cs │ ├── TestUtils.cs │ ├── TouchScreenTests │ │ ├── TouchEvent.cs │ │ ├── TouchscreenPrototypeTapTests.cs │ │ └── TouchscreenPrototypeTouchMoveTests.cs │ ├── TracingTests │ │ └── TracingTests.cs │ ├── UtilitiesTests │ │ ├── TaskHelperTests.cs │ │ └── TaskQueueTests.cs │ ├── WaitTaskTests │ │ ├── FrameWaitForFunctionTests.cs │ │ └── FrameWaitForSelectorTests.cs │ ├── WontImplementTests.cs │ ├── WorkerTests │ │ └── PageWorkerTests.cs │ ├── test.runsettings │ └── xunit.runner.json ├── PuppeteerSharp.Tooling │ ├── IdentifyMissingTests.cs │ ├── Options │ │ ├── IdentifyMissingTestsOptions.cs │ │ └── ScaffoldTestOptions.cs │ ├── Program.cs │ ├── PuppeteerSharp.Tooling.csproj │ └── ScaffoldTest.cs ├── PuppeteerSharp.sln ├── PuppeteerSharp │ ├── AddTagOptions.cs │ ├── AriaQueryOption.cs │ ├── Binding.cs │ ├── BindingUtils.cs │ ├── BoundingBox.cs │ ├── BoxModel.cs │ ├── BoxModelPoint.cs │ ├── Browser.cs │ ├── BrowserContext.cs │ ├── BrowserContextOptions.cs │ ├── BrowserData │ │ ├── Cache.cs │ │ ├── Chrome.cs │ │ ├── ChromeGoodVersionsResult.cs │ │ ├── ChromeHeadlessShell.cs │ │ ├── ChromeReleaseChannel.cs │ │ ├── Chromium.cs │ │ ├── Firefox.cs │ │ ├── FirefoxChannel.cs │ │ ├── InstalledBrowser.cs │ │ └── JsonUtils.cs │ ├── BrowserFetcher.cs │ ├── BrowserFetcherOptions.cs │ ├── BrowserTag.cs │ ├── BufferException.cs │ ├── CDPSession.cs │ ├── Cdp │ │ ├── CdpBrowser.cs │ │ ├── CdpBrowserContext.cs │ │ ├── CdpCDPSession.cs │ │ ├── CdpDevToolsTarget.cs │ │ ├── CdpDialog.cs │ │ ├── CdpElementHandle.cs │ │ ├── CdpFrame.cs │ │ ├── CdpHttpRequest.cs │ │ ├── CdpHttpResponse.cs │ │ ├── CdpJSHandle.cs │ │ ├── CdpKeyboard.cs │ │ ├── CdpMouse.cs │ │ ├── CdpOtherTarget.cs │ │ ├── CdpPage.cs │ │ ├── CdpPageTarget.cs │ │ ├── CdpTarget.cs │ │ ├── CdpTouchscreen.cs │ │ ├── CdpWebWorker.cs │ │ ├── CdpWorkerTarget.cs │ │ ├── ChromeTargetManager.cs │ │ ├── Connection.cs │ │ ├── FirefoxTargetManager.cs │ │ ├── FrameManager.cs │ │ ├── FrameTree.cs │ │ ├── IFrameProvider.cs │ │ ├── ITargetManager.cs │ │ ├── LifecycleWatcher.cs │ │ ├── Messaging │ │ │ ├── AccessibilityGetFullAXTreeResponse.cs │ │ │ ├── AccessibilityQueryAXTreeRequest.cs │ │ │ ├── AccessibilityQueryAXTreeResponse.cs │ │ │ ├── BasicFrameResponse.cs │ │ │ ├── BindingCalledResponse.cs │ │ │ ├── BrowserGetVersionResponse.cs │ │ │ ├── BrowserGrantPermissionsRequest.cs │ │ │ ├── BrowserResetPermissionsRequest.cs │ │ │ ├── CSSStopRuleUsageTrackingResponse.cs │ │ │ ├── CSSStyleSheetAddedResponse.cs │ │ │ ├── CertificateErrorResponse.cs │ │ │ ├── ConnectionError.cs │ │ │ ├── ConnectionRequest.cs │ │ │ ├── ConnectionResponse.cs │ │ │ ├── ConnectionResponseParams.cs │ │ │ ├── ContinueWithAuthRequest.cs │ │ │ ├── ContinueWithAuthRequestChallengeResponse.cs │ │ │ ├── CreateBrowserContextResponse.cs │ │ │ ├── CssGetStyleSheetTextRequest.cs │ │ │ ├── CssGetStyleSheetTextResponse.cs │ │ │ ├── DebuggerGetScriptSourceRequest.cs │ │ │ ├── DebuggerGetScriptSourceResponse.cs │ │ │ ├── DebuggerScriptParsedResponse.cs │ │ │ ├── DebuggerSetSkipAllPausesRequest.cs │ │ │ ├── DeviceAccessCancelPrompt.cs │ │ │ ├── DeviceAccessDeviceRequestPromptedResponse.cs │ │ │ ├── DeviceAccessSelectPrompt.cs │ │ │ ├── DispatchKeyEventType.cs │ │ │ ├── DomDescribeNodeRequest.cs │ │ │ ├── DomDescribeNodeResponse.cs │ │ │ ├── DomGetBoxModelRequest.cs │ │ │ ├── DomGetBoxModelResponse.cs │ │ │ ├── DomGetContentQuadsRequest.cs │ │ │ ├── DomGetFrameOwnerRequest.cs │ │ │ ├── DomGetFrameOwnerResponse.cs │ │ │ ├── DomResolveNodeRequest.cs │ │ │ ├── DomResolveNodeResponse.cs │ │ │ ├── DomScrollIntoViewIfNeededRequest.cs │ │ │ ├── DomSetFileInputFilesRequest.cs │ │ │ ├── DragEventType.cs │ │ │ ├── EmulateTimezoneRequest.cs │ │ │ ├── EmulationSetCPUThrottlingRateRequest.cs │ │ │ ├── EmulationSetDefaultBackgroundColorOverrideColor.cs │ │ │ ├── EmulationSetDefaultBackgroundColorOverrideRequest.cs │ │ │ ├── EmulationSetDeviceMetricsOverrideRequest.cs │ │ │ ├── EmulationSetEmulatedMediaFeatureRequest.cs │ │ │ ├── EmulationSetEmulatedMediaTypeRequest.cs │ │ │ ├── EmulationSetEmulatedVisionDeficiencyRequest.cs │ │ │ ├── EmulationSetIdleOverrideRequest.cs │ │ │ ├── EmulationSetScriptExecutionDisabledRequest.cs │ │ │ ├── EmulationSetTouchEmulationEnabledRequest.cs │ │ │ ├── EvaluateExceptionResponseDetails.cs │ │ │ ├── EvaluateExceptionResponseInfo.cs │ │ │ ├── EvaluateExceptionResponseStackTrace.cs │ │ │ ├── EvaluateHandleResponse.cs │ │ │ ├── EvaluationExceptionResponseCallFrame.cs │ │ │ ├── FetchAuthRequiredResponse.cs │ │ │ ├── FetchContinueRequestRequest.cs │ │ │ ├── FetchEnableRequest.cs │ │ │ ├── FetchFailRequest.cs │ │ │ ├── FetchFulfillRequest.cs │ │ │ ├── FetchRequestPausedResponse.cs │ │ │ ├── FileChooserAction.cs │ │ │ ├── GetBrowserContextsResponse.cs │ │ │ ├── GetContentQuadsResponse.cs │ │ │ ├── Header.cs │ │ │ ├── IOCloseRequest.cs │ │ │ ├── IOReadRequest.cs │ │ │ ├── IOReadResponse.cs │ │ │ ├── InputDispatchDragEventRequest.cs │ │ │ ├── InputDispatchKeyEventRequest.cs │ │ │ ├── InputDispatchMouseEventRequest.cs │ │ │ ├── InputDispatchTouchEventRequest.cs │ │ │ ├── InputInsertTextRequest.cs │ │ │ ├── InputSetInterceptDragsRequest.cs │ │ │ ├── LifecycleEventResponse.cs │ │ │ ├── LoadingFailedEventResponse.cs │ │ │ ├── LoadingFinishedEventResponse.cs │ │ │ ├── LogEntryAddedResponse.cs │ │ │ ├── LogSource.cs │ │ │ ├── MouseEventType.cs │ │ │ ├── NavigatedWithinDocumentResponse.cs │ │ │ ├── NavigationType.cs │ │ │ ├── NetworkEmulateNetworkConditionsRequest.cs │ │ │ ├── NetworkGetCookiesRequest.cs │ │ │ ├── NetworkGetCookiesResponse.cs │ │ │ ├── NetworkGetResponseBodyRequest.cs │ │ │ ├── NetworkGetResponseBodyResponse.cs │ │ │ ├── NetworkSetCacheDisabledRequest.cs │ │ │ ├── NetworkSetCookiesRequest.cs │ │ │ ├── NetworkSetExtraHTTPHeadersRequest.cs │ │ │ ├── NetworkSetUserAgentOverrideRequest.cs │ │ │ ├── PageAddScriptToEvaluateOnNewDocumentRequest.cs │ │ │ ├── PageAddScriptToEvaluateOnNewDocumentResponse.cs │ │ │ ├── PageCaptureScreenshotRequest.cs │ │ │ ├── PageCaptureScreenshotResponse.cs │ │ │ ├── PageConsoleResponse.cs │ │ │ ├── PageCreateIsolatedWorldRequest.cs │ │ │ ├── PageFileChooserOpenedResponse.cs │ │ │ ├── PageFrameAttachedResponse.cs │ │ │ ├── PageFrameDetachedResponse.cs │ │ │ ├── PageFrameNavigatedResponse.cs │ │ │ ├── PageGetFrameTree.cs │ │ │ ├── PageGetFrameTreeResponse.cs │ │ │ ├── PageGetLayoutMetricsResponse.cs │ │ │ ├── PageGetNavigationHistoryResponse.cs │ │ │ ├── PageHandleFileChooserRequest.cs │ │ │ ├── PageHandleJavaScriptDialogRequest.cs │ │ │ ├── PageJavascriptDialogOpeningResponse.cs │ │ │ ├── PageNavigateRequest.cs │ │ │ ├── PageNavigateResponse.cs │ │ │ ├── PageNavigateToHistoryEntryRequest.cs │ │ │ ├── PagePrintToPDFRequest.cs │ │ │ ├── PagePrintToPDFResponse.cs │ │ │ ├── PageReloadRequest.cs │ │ │ ├── PageRemoveScriptToEvaluateOnNewDocumentRequest.cs │ │ │ ├── PageSetBypassCSPRequest.cs │ │ │ ├── PageSetInterceptFileChooserDialog.cs │ │ │ ├── PageSetLifecycleEventsEnabledRequest.cs │ │ │ ├── PerformanceGetMetricsResponse.cs │ │ │ ├── PerformanceMetricsResponse.cs │ │ │ ├── ProfilerStartPreciseCoverageRequest.cs │ │ │ ├── ProfilerTakePreciseCoverageResponse.cs │ │ │ ├── Protocol │ │ │ │ └── Network │ │ │ │ │ ├── GetRequestPostDataRequest.cs │ │ │ │ │ ├── GetRequestPostDataResponse.cs │ │ │ │ │ └── SetBypassServiceWorkerRequest.cs │ │ │ ├── RemoteObject.cs │ │ │ ├── RemoteObjectSubtype.cs │ │ │ ├── RemoteObjectType.cs │ │ │ ├── Request.cs │ │ │ ├── RequestServedFromCacheResponse.cs │ │ │ ├── RequestWillBeSentResponse.cs │ │ │ ├── ResponsePayload.cs │ │ │ ├── ResponseReceivedExtraInfoResponse.cs │ │ │ ├── ResponseReceivedResponse.cs │ │ │ ├── RuntimeAddBindingRequest.cs │ │ │ ├── RuntimeCallFunctionOnRequest.cs │ │ │ ├── RuntimeCallFunctionOnRequestArgument.cs │ │ │ ├── RuntimeCallFunctionOnRequestArgumentValue.cs │ │ │ ├── RuntimeCallFunctionOnResponse.cs │ │ │ ├── RuntimeEvaluateRequest.cs │ │ │ ├── RuntimeExceptionThrownResponse.cs │ │ │ ├── RuntimeExecutionContextCreatedResponse.cs │ │ │ ├── RuntimeExecutionContextDestroyedResponse.cs │ │ │ ├── RuntimeGetPropertiesRequest.cs │ │ │ ├── RuntimeGetPropertiesResponse.cs │ │ │ ├── RuntimeQueryObjectsRequest.cs │ │ │ ├── RuntimeQueryObjectsResponse.cs │ │ │ ├── RuntimeReleaseObjectRequest.cs │ │ │ ├── RuntimeRemoveBindingRequest.cs │ │ │ ├── SecurityHandleCertificateErrorResponse.cs │ │ │ ├── SecuritySetIgnoreCertificateErrorsRequest.cs │ │ │ ├── SecuritySetOverrideCertificateErrorsRequest.cs │ │ │ ├── StackTrace.cs │ │ │ ├── StackTraceId.cs │ │ │ ├── TargetActivateTargetRequest.cs │ │ │ ├── TargetAttachToTargetRequest.cs │ │ │ ├── TargetAttachToTargetResponse.cs │ │ │ ├── TargetAttachedToTargetResponse.cs │ │ │ ├── TargetCloseTargetRequest.cs │ │ │ ├── TargetCreateBrowserContextRequest.cs │ │ │ ├── TargetCreateTargetRequest.cs │ │ │ ├── TargetCreateTargetResponse.cs │ │ │ ├── TargetCreatedResponse.cs │ │ │ ├── TargetDestroyedResponse.cs │ │ │ ├── TargetDetachFromTargetRequest.cs │ │ │ ├── TargetDetachedFromTargetResponse.cs │ │ │ ├── TargetDisposeBrowserContextRequest.cs │ │ │ ├── TargetSendMessageToTargetRequest.cs │ │ │ ├── TargetSetAutoAttachRequest.cs │ │ │ ├── TargetSetDiscoverTargetsRequest.cs │ │ │ ├── TracingCompleteResponse.cs │ │ │ ├── TracingStartRequest.cs │ │ │ └── WSEndpointResponse.cs │ │ ├── NetworkEventManager.cs │ │ └── NetworkManager.cs │ ├── ChromeLauncher.cs │ ├── CommandOptions.cs │ ├── ConnectOptions.cs │ ├── ConsoleEventArgs.cs │ ├── ConsoleMessage.cs │ ├── ConsoleMessageLocation.cs │ ├── ConsoleType.cs │ ├── ContextPayload.cs │ ├── ContextPayloadAuxData.cs │ ├── CookieParam.cs │ ├── CookiePriority.cs │ ├── CookieSourceScheme.cs │ ├── Credentials.cs │ ├── CustomQueryHandler.cs │ ├── DOMWorldType.cs │ ├── DeviceRequestPrompt.cs │ ├── DeviceRequestPromptDevice.cs │ ├── DeviceRequestPromptManager.cs │ ├── Dialog.cs │ ├── DialogEventArgs.cs │ ├── DialogType.cs │ ├── DisposableActionsStack.cs │ ├── DisposableTasksStack.cs │ ├── DragData.cs │ ├── DragDataItem.cs │ ├── DragOperation.cs │ ├── ElementHandle.cs │ ├── ElementScreenshotOptions.cs │ ├── EmulateIdleOverrides.cs │ ├── EmulationManager.cs │ ├── ErrorEventArgs.cs │ ├── EvaluationFailedException.cs │ ├── ExecutionContext.cs │ ├── FileChooser.cs │ ├── FirefoxLauncher.cs │ ├── Frame.cs │ ├── FrameEventArgs.cs │ ├── FrameNavigatedEventArgs.cs │ ├── FramePayload.cs │ ├── GeolocationOption.cs │ ├── GetContentOptions.cs │ ├── HeadlessMode.cs │ ├── Helpers │ │ ├── AsyncDictionaryHelper.cs │ │ ├── AsyncFileHelper.cs │ │ ├── AsyncMessageQueue.cs │ │ ├── ConcurrentSet.cs │ │ ├── DeferredTaskQueue.cs │ │ ├── DictionaryExtensions.cs │ │ ├── EnumHelper.cs │ │ ├── Json │ │ │ ├── AnyTypeToStringConverter.cs │ │ │ ├── CookiePartitionKeyConverter.cs │ │ │ ├── DefaultEnumValueAttribute.cs │ │ │ ├── HttpMethodConverter.cs │ │ │ ├── JSHandleConverter.cs │ │ │ ├── JsonHelper.cs │ │ │ ├── JsonStringEnumMemberConverter.cs │ │ │ ├── JsonStringIgnoreAttribute.cs │ │ │ ├── LowSurrogateConverter.cs │ │ │ ├── PrimitiveTypeConverter.cs │ │ │ └── SystemTextJsonSerializationContext.cs │ │ ├── Linux │ │ │ ├── FileAccessPermissions.cs │ │ │ └── LinuxSysCall.cs │ │ ├── MultiMap.cs │ │ ├── ProtocolStreamReader.cs │ │ ├── RemoteObjectHelper.cs │ │ ├── StringExtensions.cs │ │ ├── TaskHelper.cs │ │ ├── TaskQueue.cs │ │ └── TempDirectory.cs │ ├── IBrowser.cs │ ├── IBrowserContext.cs │ ├── IBrowserFetcher.cs │ ├── IBrowserOptions.cs │ ├── ICDPConnection.cs │ ├── ICDPSession.cs │ ├── IConnectionOptions.cs │ ├── IElementHandle.cs │ ├── IEnvironment.cs │ ├── IExecutionContext.cs │ ├── IFrame.cs │ ├── IJSHandle.cs │ ├── IPage.cs │ ├── IRequest.cs │ ├── IResponse.cs │ ├── ITarget.cs │ ├── ITracing.cs │ ├── InitializationStatus.cs │ ├── Initiator.cs │ ├── InitiatorType.cs │ ├── Injected │ │ ├── README.md │ │ └── injected.js │ ├── Input │ │ ├── ClickOptions.cs │ │ ├── DownOptions.cs │ │ ├── IKeyboard.cs │ │ ├── IMouse.cs │ │ ├── ITouchscreen.cs │ │ ├── Key.cs │ │ ├── KeyDefinition.cs │ │ ├── KeyDefinitions.cs │ │ ├── Keyboard.cs │ │ ├── Mouse.cs │ │ ├── MouseButton.cs │ │ ├── MouseState.cs │ │ ├── MouseTransaction.cs │ │ ├── MoveOptions.cs │ │ ├── PointerType.cs │ │ ├── PressOptions.cs │ │ ├── TouchPoint.cs │ │ ├── Touchscreen.cs │ │ └── TypeOptions.cs │ ├── InterceptResolutionAction.cs │ ├── InterceptResolutionState.cs │ ├── InternalNetworkConditions.cs │ ├── InvalidTargetException.cs │ ├── IsExternalInit.cs │ ├── IsolatedWorld.cs │ ├── JSHandle.cs │ ├── LaunchOptions.cs │ ├── Launcher.cs │ ├── LauncherBase.cs │ ├── Media │ │ ├── Clip.cs │ │ ├── MarginOptions.cs │ │ ├── MediaType.cs │ │ ├── PaperFormat.cs │ │ ├── ScreenOrientation.cs │ │ └── ScreenOrientationType.cs │ ├── MediaFeature.cs │ ├── MediaFeatureValue.cs │ ├── MessageEventArgs.cs │ ├── MessageException.cs │ ├── MessageTask.cs │ ├── Metric.cs │ ├── MetricEventArgs.cs │ ├── Mobile │ │ ├── DeviceDescriptor.cs │ │ ├── DeviceDescriptorName.cs │ │ └── DeviceDescriptors.cs │ ├── NavigationException.cs │ ├── NavigationOptions.cs │ ├── NetworkConditions.cs │ ├── NewDocumentScriptEvaluation.cs │ ├── Offset.cs │ ├── OverridePermission.cs │ ├── Page.cs │ ├── PageAccessibility │ │ ├── AXNode.cs │ │ ├── Accessibility.cs │ │ ├── AccessibilitySnapshotOptions.cs │ │ ├── CheckedState.cs │ │ ├── IAccessibility.cs │ │ └── SerializedAXNode.cs │ ├── PageBinding.cs │ ├── PageCloseOptions.cs │ ├── PageCoverage │ │ ├── CSSCoverage.cs │ │ ├── Coverage.cs │ │ ├── CoverageEntry.cs │ │ ├── CoverageEntryPoint.cs │ │ ├── CoverageEntryRange.cs │ │ ├── CoverageRange.cs │ │ ├── CoverageStartOptions.cs │ │ ├── FunctionCoverage.cs │ │ ├── ICoverage.cs │ │ ├── JSCoverage.cs │ │ ├── JSCoverageEntry.cs │ │ └── ScriptCoverage.cs │ ├── PageErrorEventArgs.cs │ ├── Payload.cs │ ├── PdfOptions.cs │ ├── Platform.cs │ ├── Point.cs │ ├── PopupEventArgs.cs │ ├── PredefinedNetworkConditions.cs │ ├── ProcessException.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Puppeteer.cs │ ├── PuppeteerException.cs │ ├── PuppeteerHandleExtensions.cs │ ├── PuppeteerSharp.csproj │ ├── QueryHandlers │ │ ├── AriaQueryHandler.cs │ │ ├── CssQueryHandler.cs │ │ ├── CustomQuerySelectorRegistry.cs │ │ ├── PierceQueryHandler.cs │ │ ├── QueryHandler.cs │ │ ├── TextQueryHandler.cs │ │ └── XPathQueryHandler.cs │ ├── QueuedEventGroup.cs │ ├── Realm.cs │ ├── RedirectInfo.cs │ ├── RemoteAddress.cs │ ├── Request.cs │ ├── RequestAbortErrorCode.cs │ ├── RequestEventArgs.cs │ ├── ResourceType.cs │ ├── Response.cs │ ├── ResponseCreatedEventArgs.cs │ ├── ResponseData.cs │ ├── SameSite.cs │ ├── ScreenshotOptions.cs │ ├── ScreenshotType.cs │ ├── ScriptInjector.cs │ ├── SecurityDetails.cs │ ├── SelectorException.cs │ ├── SessionEventArgs.cs │ ├── States │ │ ├── DisposedState.cs │ │ ├── ExitedState.cs │ │ ├── ExitingState.cs │ │ ├── InitialState.cs │ │ ├── KillingState.cs │ │ ├── ProcessStartingState.cs │ │ ├── StartedState.cs │ │ ├── State.cs │ │ └── StateManager.cs │ ├── SupportedBrowser.cs │ ├── Target.cs │ ├── TargetChangedArgs.cs │ ├── TargetClosedException.cs │ ├── TargetCrashedException.cs │ ├── TargetInfo.cs │ ├── TargetType.cs │ ├── TaskManager.cs │ ├── TimeoutSettings.cs │ ├── Tracing.cs │ ├── TracingOptions.cs │ ├── Transport │ │ ├── IConnectionTransport.cs │ │ ├── MessageReceivedEventArgs.cs │ │ ├── TransportClosedEventArgs.cs │ │ ├── TransportFactory.cs │ │ ├── TransportTaskScheduler.cs │ │ ├── WebSocketFactory.cs │ │ └── WebSocketTransport.cs │ ├── UserAgentBrandVersion.cs │ ├── UserAgentMetadata.cs │ ├── ViewPortOptions.cs │ ├── VisionDeficiency.cs │ ├── WaitForFunctionOptions.cs │ ├── WaitForFunctionPollingOption.cs │ ├── WaitForNetworkIdleOptions.cs │ ├── WaitForOptions.cs │ ├── WaitForSelectorOptions.cs │ ├── WaitTask.cs │ ├── WaitTaskTimeoutException.cs │ ├── WaitUntilNavigation.cs │ ├── WebWorker.cs │ └── WorkerEventArgs.cs ├── keys │ └── keypair.snk └── stylecop.json ├── mdsnippets.json ├── samples ├── PupppeterSharpAspNetFrameworkSample │ ├── PupppeterSharpAspNetFrameworkSample.sln │ └── PupppeterSharpAspNetFrameworkSample │ │ ├── App_Start │ │ └── WebApiConfig.cs │ │ ├── Controllers │ │ ├── FooController.cs │ │ └── TestController.cs │ │ ├── Global.asax │ │ ├── Global.asax.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── PupppeterSharpAspNetFrameworkSample.csproj │ │ ├── Services │ │ └── BrowserClient.cs │ │ ├── Web.Debug.config │ │ ├── Web.Release.config │ │ ├── Web.config │ │ ├── favicon.ico │ │ └── packages.config ├── README.md ├── Samples.sln ├── complex-js-objects │ ├── Program.cs │ └── complex-js-objects.csproj ├── get-all-links │ ├── .vscode │ │ ├── launch.json │ │ └── tasks.json │ ├── Program.cs │ ├── README.md │ └── get-all-links.csproj ├── reuse-downloaded-chrome │ ├── Program.cs │ ├── README.md │ └── reuse-downloaded-chrome.csproj └── searching │ ├── Program.cs │ ├── README.md │ └── searching.csproj └── tools ├── github-ops ├── create-issue-from-file.js ├── create-issue-from-upstream ├── package-lock.json └── package.json └── upstream-ops ├── generate-ignore-tests.js └── package.json /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | *.sh eol=lf 3 | *.sln text eol=crlf 4 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: hardkoded 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with open collective user 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /Directory.Build.props: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <Project> 3 | <PropertyGroup> 4 | <LangVersion>9</LangVersion> 5 | <TreatWarningsAsErrors>true</TreatWarningsAsErrors> 6 | </PropertyGroup> 7 | </Project> -------------------------------------------------------------------------------- /demos/PuppeteerSharpPdfDemo/PuppeteerSharpPdfDemo-Local.csproj: -------------------------------------------------------------------------------- 1 | <Project Sdk="Microsoft.NET.Sdk"> 2 | <PropertyGroup> 3 | <OutputType>Exe</OutputType> 4 | <TargetFrameworks>net8.0;net471</TargetFrameworks> 5 | <LangVersion>12</LangVersion> 6 | </PropertyGroup> 7 | <PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'"> 8 | <PublishAot>true</PublishAot> 9 | </PropertyGroup> 10 | <ItemGroup> 11 | <ProjectReference Include="..\..\lib\PuppeteerSharp\PuppeteerSharp.csproj" /> 12 | </ItemGroup> 13 | </Project> 14 | -------------------------------------------------------------------------------- /demos/PuppeteerSharpPdfDemo/PuppeteerSharpPdfDemo.csproj: -------------------------------------------------------------------------------- 1 | <Project Sdk="Microsoft.NET.Sdk"> 2 | 3 | <PropertyGroup> 4 | <OutputType>Exe</OutputType> 5 | <TargetFramework>net8.0</TargetFramework> 6 | <LangVersion>default</LangVersion> 7 | </PropertyGroup> 8 | <ItemGroup> 9 | <PackageReference Include="PuppeteerSharp" Version="13.0.2" /> 10 | </ItemGroup> 11 | </Project> 12 | -------------------------------------------------------------------------------- /docfx_project/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # folder # 3 | ############### 4 | /**/DROP/ 5 | /**/TEMP/ 6 | /**/packages/ 7 | /**/bin/ 8 | /**/obj/ 9 | _site 10 | -------------------------------------------------------------------------------- /docfx_project/api/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # temp file # 3 | ############### 4 | *.yml 5 | .manifest 6 | -------------------------------------------------------------------------------- /docfx_project/readme.md: -------------------------------------------------------------------------------- 1 | # DocFX configuration 2 | 3 | ## Customizations 4 | 5 | These are the changes made in the custom template. 6 | 7 | * `conceptual.html.primary.js`: Add the `docurl` pointing to the GitHub issues page. 8 | * 'logo.svg` is the puppeteer-sharp logo. 9 | * `ManagedReference.common.js` is the same as the one in `common` but we are setting the `docurl` to point to the GitHub issues page. 10 | * `token.json`. We change the `improveThisDoc` text. 11 | * `partials/class.header.tmpl.partial`: The `inherited members` section was removed. 12 | -------------------------------------------------------------------------------- /docfx_project/templates/.editorconfig: -------------------------------------------------------------------------------- 1 | root = false 2 | 3 | # Settings for Docfx template files 4 | [*] 5 | charset = utf-8 6 | end_of_line = lf 7 | indent_size = 2 8 | -------------------------------------------------------------------------------- /docfx_project/templates/.eslintrc.js: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | module.exports = { 5 | env: { 6 | browser: true 7 | }, 8 | ignorePatterns: ['**/*.js'], 9 | extends: ['standard', 'eslint:recommended', 'plugin:@typescript-eslint/recommended'], 10 | parser: '@typescript-eslint/parser', 11 | plugins: ['@typescript-eslint'], 12 | root: true, 13 | rules: { 14 | 'space-before-function-paren': ['warn', 'never'], 15 | } 16 | }; 17 | -------------------------------------------------------------------------------- /docfx_project/templates/.gitignore: -------------------------------------------------------------------------------- 1 | *.min.js 2 | *.min.css 3 | *.map 4 | *.woff 5 | *.woff2 6 | 7 | glyphicons-*.* 8 | 9 | dist 10 | fonts 11 | node_modules 12 | -------------------------------------------------------------------------------- /docfx_project/templates/.stylelintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-standard-scss", 3 | "ignoreFiles": [ 4 | "**/*.ts", 5 | "**/*.js" 6 | ], 7 | "rules": { 8 | "selector-class-pattern": null, 9 | "media-feature-range-notation": null, 10 | "font-family-no-missing-generic-family-keyword": [ true, { 11 | "ignoreFontFamilies": [ 12 | "bootstrap-icons" 13 | ] 14 | }] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /docfx_project/templates/README.md: -------------------------------------------------------------------------------- 1 | This folder contains the source code for website themes used by docfx.exe. 2 | -------------------------------------------------------------------------------- /docfx_project/templates/default/ManagedReference.extension.js: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | /** 5 | * This method will be called at the start of exports.transform in ManagedReference.html.primary.js 6 | */ 7 | exports.preTransform = function (model) { 8 | return model; 9 | } 10 | 11 | /** 12 | * This method will be called at the end of exports.transform in ManagedReference.html.primary.js 13 | */ 14 | exports.postTransform = function (model) { 15 | return model; 16 | } 17 | -------------------------------------------------------------------------------- /docfx_project/templates/default/ManagedReference.html.primary.tmpl: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | {{!master(layout/_master.tmpl)}} 3 | 4 | {{#isNamespace}} 5 | {{>partials/namespace}} 6 | {{/isNamespace}} 7 | 8 | {{#_splitReference}} 9 | {{#isClass}} 10 | {{>partials/class.memberpage}} 11 | {{/isClass}} 12 | {{/_splitReference}} 13 | {{^_splitReference}} 14 | {{#isClass}} 15 | {{>partials/class}} 16 | {{/isClass}} 17 | {{/_splitReference}} 18 | 19 | {{#isEnum}} 20 | {{>partials/enum}} 21 | {{/isEnum}} 22 | {{>partials/customMREFContent}} 23 | -------------------------------------------------------------------------------- /docfx_project/templates/default/Redirection.html.primary.tmpl: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | <!DOCTYPE html> 3 | <html {{#_lang}}lang="{{_lang}}"{{/_lang}}> 4 | <head> 5 | <meta charset="utf-8"> 6 | <meta http-equiv="refresh" content="0;URL='{{redirect_url}}'"> 7 | </head> 8 | </html> 9 | -------------------------------------------------------------------------------- /docfx_project/templates/default/RestApi.extension.js: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | /** 5 | * This method will be called at the start of exports.transform in RestApi.html.primary.js 6 | */ 7 | exports.preTransform = function (model) { 8 | return model; 9 | } 10 | 11 | /** 12 | * This method will be called at the end of exports.transform in RestApi.html.primary.js 13 | */ 14 | exports.postTransform = function (model) { 15 | return model; 16 | } 17 | -------------------------------------------------------------------------------- /docfx_project/templates/default/RestApi.html.primary.tmpl: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | {{!master(layout/_master.tmpl)}} 3 | {{>partials/rest}} 4 | -------------------------------------------------------------------------------- /docfx_project/templates/default/UniversalReference.extension.js: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | /** 5 | * This method will be called at the start of exports.transform in UniversalReference.html.primary.js 6 | */ 7 | exports.preTransform = function (model) { 8 | return model; 9 | } 10 | 11 | /** 12 | * This method will be called at the end of exports.transform in UniversalReference.html.primary.js 13 | */ 14 | exports.postTransform = function (model) { 15 | return model; 16 | } 17 | -------------------------------------------------------------------------------- /docfx_project/templates/default/UniversalReference.html.primary.tmpl: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | {{!master(layout/_master.tmpl)}} 3 | 4 | {{#isNamespace}} 5 | {{>partials/uref/namespace}} 6 | {{/isNamespace}} 7 | {{#isClass}} 8 | {{>partials/uref/class}} 9 | {{/isClass}} 10 | {{#isEnum}} 11 | {{>partials/enum}} 12 | {{/isEnum}} 13 | -------------------------------------------------------------------------------- /docfx_project/templates/default/conceptual.extension.js: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | /** 5 | * This method will be called at the start of exports.transform in conceptual.html.primary.js 6 | */ 7 | exports.preTransform = function (model) { 8 | return model; 9 | } 10 | 11 | /** 12 | * This method will be called at the end of exports.transform in conceptual.html.primary.js 13 | */ 14 | exports.postTransform = function (model) { 15 | return model; 16 | } 17 | -------------------------------------------------------------------------------- /docfx_project/templates/default/conceptual.html.primary.tmpl: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | {{!master(layout/_master.tmpl)}} 3 | {{{rawTitle}}} 4 | {{{conceptual}}} 5 | -------------------------------------------------------------------------------- /docfx_project/templates/default/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/docfx_project/templates/default/favicon.ico -------------------------------------------------------------------------------- /docfx_project/templates/default/partials/breadcrumb.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | 3 | <div class="subnav navbar navbar-default"> 4 | <div class="container hide-when-search" id="breadcrumb"> 5 | <ul class="breadcrumb"> 6 | <li>{{_tocTitle}}</li> 7 | </ul> 8 | </div> 9 | </div> 10 | -------------------------------------------------------------------------------- /docfx_project/templates/default/partials/customMREFContent.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | {{!Add your own custom template for the content for ManagedReference here}} 3 | {{#_splitReference}} 4 | {{#isCollection}} 5 | {{>partials/collection}} 6 | {{/isCollection}} 7 | {{#isItem}} 8 | {{>partials/item}} 9 | {{/isItem}} 10 | {{/_splitReference}} 11 | -------------------------------------------------------------------------------- /docfx_project/templates/default/partials/dd-li.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{#items}} 2 | <li><a href="{{topicHref}}">{{name}}</a></li> 3 | {{/items}} 4 | -------------------------------------------------------------------------------- /docfx_project/templates/default/partials/footer.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | 3 | <footer> 4 | <div class="grad-bottom"></div> 5 | <div class="footer"> 6 | <div class="container"> 7 | <span class="pull-right"> 8 | <a href="#top">{{__global.backToTop}}</a> 9 | </span> 10 | {{{_appFooter}}} 11 | {{^_appFooter}}<span>Generated by <strong>DocFX</strong></span>{{/_appFooter}} 12 | </div> 13 | </div> 14 | </footer> 15 | -------------------------------------------------------------------------------- /docfx_project/templates/default/partials/item.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | 3 | {{>partials/class.header}} 4 | -------------------------------------------------------------------------------- /docfx_project/templates/default/partials/logo.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | 3 | <a class="navbar-brand" href="{{_appLogoUrl}}{{^_appLogoUrl}}{{_rel}}index.html{{/_appLogoUrl}}"> 4 | <img id="logo" class="svg" src="{{_rel}}{{{_appLogoPath}}}{{^_appLogoPath}}logo.svg{{/_appLogoPath}}" alt="{{_appName}}" > 5 | </a> 6 | -------------------------------------------------------------------------------- /docfx_project/templates/default/partials/namespace.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | 3 | <h1 id="{{id}}" data-uid="{{uid}}" class="text-break">{{>partials/title}}</h1> 4 | <div class="markdown level0 summary">{{{summary}}}</div> 5 | <div class="markdown level0 conceptual">{{{conceptual}}}</div> 6 | <div class="markdown level0 remarks">{{{remarks}}}</div> 7 | {{#children}} 8 | <h3 id="{{id}}">{{>partials/namespaceSubtitle}}</h3> 9 | {{#children}} 10 | <h4><xref uid="{{uid}}" altProperty="fullName" displayProperty="name"/></h4> 11 | <section>{{{summary}}}</section> 12 | {{/children}} 13 | {{/children}} 14 | -------------------------------------------------------------------------------- /docfx_project/templates/default/partials/scripts.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | 3 | <script type="text/javascript" src="{{_rel}}styles/docfx.vendor.min.js"></script> 4 | <script type="text/javascript" src="{{_rel}}styles/docfx.js"></script> 5 | <script type="text/javascript" src="{{_rel}}styles/main.js"></script> 6 | -------------------------------------------------------------------------------- /docfx_project/templates/default/partials/searchResults.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | 3 | <div id="search-results"> 4 | <div class="search-list">{{__global.searchResults}} <span></span></div> 5 | <div class="sr-items"> 6 | <p><i class="glyphicon glyphicon-refresh index-loading"></i></p> 7 | </div> 8 | <ul id="pagination" data-first={{__global.pageFirst}} data-prev={{__global.pagePrev}} data-next={{__global.pageNext}} data-last={{__global.pageLast}}></ul> 9 | </div> 10 | -------------------------------------------------------------------------------- /docfx_project/templates/default/partials/toc.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | 3 | <div class="sidenav hide-when-search"> 4 | <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">{{__global.tocToggleButton}}</a> 5 | <div class="sidetoggle collapse" id="sidetoggle"> 6 | <div id="sidetoc"></div> 7 | </div> 8 | </div> 9 | -------------------------------------------------------------------------------- /docfx_project/templates/default/partials/uref/inheritance.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{#inheritance}} 2 | {{>partials/uref/inheritance}} 3 | {{/inheritance}} 4 | <div class="level{{level}}">{{{type.specName.0.value}}}</div> 5 | -------------------------------------------------------------------------------- /docfx_project/templates/default/src/docfx.vendor.js: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | require('@default/bootstrap/dist/css/bootstrap.css') 5 | require('@default/highlight.js/styles/github.css') 6 | 7 | window.$ = window.jQuery = require('jquery') 8 | 9 | require('@default/bootstrap') 10 | require('@default/twbs-pagination') 11 | require('@default/mark.js/src/jquery') 12 | 13 | const AnchorJS = require('@default/anchor-js') 14 | window.anchors = new AnchorJS() 15 | 16 | window.hljs = require('@default/highlight.js') 17 | require('@default/url/src/url.js') 18 | -------------------------------------------------------------------------------- /docfx_project/templates/default/styles/main.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/docfx_project/templates/default/styles/main.css -------------------------------------------------------------------------------- /docfx_project/templates/default/styles/main.js: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | -------------------------------------------------------------------------------- /docfx_project/templates/default/toc.extension.js: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | /** 5 | * This method will be called at the start of exports.transform in toc.html.js 6 | */ 7 | exports.preTransform = function (model) { 8 | return model; 9 | } 10 | 11 | /** 12 | * This method will be called at the end of exports.transform in toc.html.js 13 | */ 14 | exports.postTransform = function (model) { 15 | return model; 16 | } 17 | -------------------------------------------------------------------------------- /docfx_project/templates/default/toc.json.tmpl: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | 3 | {{{content}}} 4 | -------------------------------------------------------------------------------- /docfx_project/templates/jest.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ 2 | module.exports = { 3 | preset: 'ts-jest', 4 | testEnvironment: 'node', 5 | transform: { 6 | '^.+\\.[tj]s#39;: ['ts-jest', { 7 | tsconfig: { 8 | allowJs: true 9 | } 10 | }] 11 | }, 12 | transformIgnorePatterns: [ 13 | '<rootDir>/node_modules/(?!lit-html)' 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /docfx_project/templates/modern/ApiPage.html.primary.js: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | exports.transform = function (model) { 5 | return model; 6 | } 7 | -------------------------------------------------------------------------------- /docfx_project/templates/modern/ApiPage.html.primary.tmpl: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | {{!master(layout/_master.tmpl)}} 3 | 4 | {{{content}}} 5 | -------------------------------------------------------------------------------- /docfx_project/templates/modern/partials/collection.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | 3 | {{>partials/class}} 4 | -------------------------------------------------------------------------------- /docfx_project/templates/modern/partials/customMREFContent.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | {{!Add your own custom template for the content for ManagedReference here}} 3 | {{#_splitReference}} 4 | {{#isCollection}} 5 | {{>partials/collection}} 6 | {{/isCollection}} 7 | {{#isItem}} 8 | {{>partials/item}} 9 | {{/isItem}} 10 | {{/_splitReference}} 11 | -------------------------------------------------------------------------------- /docfx_project/templates/modern/partials/enum.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | 3 | {{>partials/class.header}} 4 | 5 | {{#seealso.0}} 6 | <h2 id="seealso">{{__global.seealso}}</h2> 7 | <div class="seealso"> 8 | {{/seealso.0}} 9 | {{#seealso}} 10 | {{#isCref}} 11 | <div>{{{type.specName.0.value}}}</div> 12 | {{/isCref}} 13 | {{^isCref}} 14 | <div>{{{url}}}</div> 15 | {{/isCref}} 16 | {{/seealso}} 17 | {{#seealso.0}} 18 | </div> 19 | {{/seealso.0}} 20 | -------------------------------------------------------------------------------- /docfx_project/templates/modern/partials/item.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | 3 | {{>partials/class.header}} 4 | -------------------------------------------------------------------------------- /docfx_project/templates/modern/public/main.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/docfx_project/templates/modern/public/main.css -------------------------------------------------------------------------------- /docfx_project/templates/modern/public/main.js: -------------------------------------------------------------------------------- 1 | export default {} 2 | -------------------------------------------------------------------------------- /docfx_project/templates/modern/src/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the .NET Foundation under one or more agreements. 3 | * The .NET Foundation licenses this file to you under the MIT license. 4 | */ 5 | 6 | export default {} 7 | -------------------------------------------------------------------------------- /docfx_project/templates/modern/src/mixins.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the .NET Foundation under one or more agreements. 3 | * The .NET Foundation licenses this file to you under the MIT license. 4 | */ 5 | 6 | @mixin adjust-icon { 7 | font-family: bootstrap-icons; 8 | position: relative; 9 | margin-right: 0.5em; 10 | top: 0.2em; 11 | font-size: 1.25em; 12 | font-weight: normal; 13 | } 14 | 15 | @mixin underline-on-hover { 16 | text-decoration: none; 17 | 18 | &:hover, &:focus { 19 | text-decoration: underline; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /docfx_project/templates/modern/src/search.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the .NET Foundation under one or more agreements. 3 | * The .NET Foundation licenses this file to you under the MIT license. 4 | */ 5 | 6 | #search-results { 7 | line-height: 1.8; 8 | 9 | >.search-list { 10 | font-size: .9em; 11 | color: $secondary; 12 | } 13 | 14 | >.sr-items { 15 | flex: 1; 16 | 17 | .sr-item { 18 | margin-bottom: 1.5em; 19 | 20 | >.item-title { 21 | font-size: x-large; 22 | } 23 | 24 | >.item-href { 25 | color: #093; 26 | font-size: small; 27 | } 28 | 29 | >.item-brief { 30 | font-size: small; 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /docfx_project/templates/statictoc/partials/dd-li.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{#items}} 2 | <li><a href="{{topicHref}}">{{name}}</a></li> 3 | {{/items}} 4 | -------------------------------------------------------------------------------- /docfx_project/templates/statictoc/partials/li.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | 3 | <ul class="nav level{{level}}"> 4 | {{#items}} 5 | <li class="{{#active}}active{{/active}}"> 6 | {{^leaf}} 7 | <span class="expand-stub"></span> 8 | {{/leaf}} 9 | {{#href}} 10 | <a href="{{href}}" title="{{name}}" class="{{#active}}active{{/active}}">{{name}}</a> 11 | {{/href}} 12 | {{^href}} 13 | <a class="{{#active}}active{{/active}}">{{{name}}}</a> 14 | {{/href}} 15 | {{^leaf}} 16 | {{>partials/li}} 17 | {{/leaf}} 18 | </li> 19 | {{/items}} 20 | </ul> 21 | -------------------------------------------------------------------------------- /docfx_project/templates/statictoc/toc.tmpl.js: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | exports.getOptions = function (model) { 4 | return { 5 | isShared: true 6 | }; 7 | }; 8 | -------------------------------------------------------------------------------- /docfx_project/templates/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "removeComments": true, 4 | "resolveJsonModule": true, 5 | "esModuleInterop": true 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /docfx_project/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Api Documentation 2 | href: api/ 3 | homepage: api/index.md 4 | - name: Docs 5 | href: docs/ 6 | homepage: docs/index.md 7 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.DevicesFetcher/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cs] 2 | 3 | # CA1304: The behavior of 'string.ToLower()' could vary based on the current user's locale settings. Replace this call in 'JSHandle.ToString()' with a call to 'string.ToLower(CultureInfo)'. 4 | dotnet_diagnostic.CA1304.severity = none -------------------------------------------------------------------------------- /lib/PuppeteerSharp.DevicesFetcher/Device.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace PuppeteerSharp.DevicesFetcher 4 | { 5 | public class Device 6 | { 7 | [JsonPropertyName("userAgent")] 8 | public string UserAgent { get; set; } 9 | [JsonPropertyName("name")] 10 | public string Name { get; set; } 11 | [JsonPropertyName("viewport")] 12 | public ViewPort Viewport { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.DevicesFetcher/PuppeteerSharp.DevicesFetcher.csproj: -------------------------------------------------------------------------------- 1 | <Project Sdk="Microsoft.NET.Sdk"> 2 | 3 | <PropertyGroup> 4 | <OutputType>Exe</OutputType> 5 | <TargetFramework>net8.0</TargetFramework> 6 | <LangVersion>12</LangVersion> 7 | </PropertyGroup> 8 | <ItemGroup> 9 | <ProjectReference Include="..\PuppeteerSharp\PuppeteerSharp.csproj" /> 10 | </ItemGroup> 11 | 12 | </Project> 13 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cs] 2 | 3 | # CA1305: String.Format with culture 4 | dotnet_diagnostic.CA1305.severity = none 5 | # Use ConfigureAwait 6 | dotnet_diagnostic.CA2007.severity = none -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/beforeunload.html: -------------------------------------------------------------------------------- 1 | <div>beforeunload demo.</div> 2 | <script> 3 | window.addEventListener('beforeunload', event => { 4 | // Chrome way. 5 | event.returnValue = 'Leave?'; 6 | // Firefox way. 7 | event.preventDefault(); 8 | });</script> 9 | 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/cached/bfcache/index.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <body>BFCached<a href="target.html">next</a></body> 3 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/cached/bfcache/target.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <body>target</body> 3 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/cached/bfcache/worker-iframe-container.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <body>BFCached<a href="target.html">next</a></body> 3 | <script> 4 | window.addEventListener('DOMContentLoaded', () => { 5 | const iframe = document.createElement('iframe'); 6 | const url = new URL(location.href); 7 | url.hostname = url.hostname === 'localhost' ? '127.0.0.1' : 'localhost'; 8 | url.pathname = '/cached/bfcache/worker-iframe.html'; 9 | iframe.src = url.toString(); 10 | document.body.appendChild(iframe); 11 | }, false); 12 | </script> 13 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/cached/bfcache/worker-iframe.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <script> 3 | const worker = new Worker('worker.mjs', {type: 'module'}) 4 | </script> 5 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/cached/bfcache/worker.mjs: -------------------------------------------------------------------------------- 1 | console.log('HELLO'); 2 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/cached/one-style-font.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'one-style'; 3 | src: url('./one-style.woff') format('woff'); 4 | } 5 | 6 | body { 7 | background-color: pink; 8 | font-family: 'one-style', sans-serif; 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/cached/one-style-font.html: -------------------------------------------------------------------------------- 1 | <link rel='stylesheet' href='./one-style-font.css'> 2 | <div>hello, world!</div> 3 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/cached/one-style.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: pink; 3 | } 4 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/cached/one-style.html: -------------------------------------------------------------------------------- 1 | <link rel='stylesheet' href='./one-style.css'> 2 | <div>hello, world!</div> 3 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/chromium-linux.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.TestServer/wwwroot/chromium-linux.zip -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/consolelog.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <title>console.log test</title> 5 | </head> 6 | <body> 7 | <script> 8 | console.log('yellow') 9 | </script> 10 | </body> 11 | </html> 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/csp.html: -------------------------------------------------------------------------------- 1 | <meta http-equiv="Content-Security-Policy" content="default-src 'self'"> -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/csscoverage/Dosis-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.TestServer/wwwroot/csscoverage/Dosis-Regular.ttf -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/csscoverage/involved.html: -------------------------------------------------------------------------------- 1 | <style> 2 | @charset "utf-8"; 3 | @namespace svg url(http://www.w3.org/2000/svg); 4 | @font-face { 5 | font-family: "Example Font"; 6 | src: url("./Dosis-Regular.ttf"); 7 | } 8 | 9 | #fluffy { 10 | border: 1px solid black; 11 | z-index: 1; 12 | /* -webkit-disabled-property: rgb(1, 2, 3) */ 13 | -lol-cats: "dogs" /* non-existing property */ 14 | } 15 | 16 | @media (min-width: 1px) { 17 | span { 18 | -webkit-border-radius: 10px; 19 | font-family: "Example Font"; 20 | animation: 1s identifier; 21 | } 22 | } 23 | </style> 24 | <div id="fluffy">woof!</div> 25 | <span>fancy text</span> 26 | 27 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/csscoverage/media.html: -------------------------------------------------------------------------------- 1 | <style> 2 | @media screen { div { color: green; } } </style> 3 | <div>hello, world</div> 4 | 5 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/csscoverage/multiple.html: -------------------------------------------------------------------------------- 1 | <link rel="stylesheet" href="stylesheet1.css"> 2 | <link rel="stylesheet" href="stylesheet2.css"> 3 | <script> 4 | window.addEventListener('DOMContentLoaded', () => { 5 | // Force stylesheets to load. 6 | console.log(window.getComputedStyle(document.body).color); 7 | }, false); 8 | </script> 9 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/csscoverage/simple.html: -------------------------------------------------------------------------------- 1 | <style> 2 | div { color: green; } 3 | a { color: blue; } 4 | </style> 5 | <div>hello, world</div> 6 | 7 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/csscoverage/sourceurl.html: -------------------------------------------------------------------------------- 1 | <style> 2 | body { 3 | padding: 10px; 4 | } 5 | /*# sourceURL=nicename.css */ 6 | </style> 7 | 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/csscoverage/stylesheet1.css: -------------------------------------------------------------------------------- 1 | body { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/csscoverage/stylesheet2.css: -------------------------------------------------------------------------------- 1 | html { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/csscoverage/unused.html: -------------------------------------------------------------------------------- 1 | <style> 2 | @media screen { 3 | a { color: green; } 4 | } 5 | /*# sourceURL=unused.css */ 6 | </style> 7 | 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/detect-touch.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <title>Detect Touch Test</title> 5 | <script src='modernizr.js'></script> 6 | </head> 7 | <body style="font-size:30vmin"> 8 | <script> 9 | document.body.textContent = Modernizr.touchevents ? 'YES' : 'NO'; 10 | </script> 11 | </body> 12 | </html> 13 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/digits/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.TestServer/wwwroot/digits/0.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/digits/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.TestServer/wwwroot/digits/1.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/digits/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.TestServer/wwwroot/digits/2.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/digits/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.TestServer/wwwroot/digits/3.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/digits/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.TestServer/wwwroot/digits/4.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/digits/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.TestServer/wwwroot/digits/5.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/digits/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.TestServer/wwwroot/digits/6.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/digits/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.TestServer/wwwroot/digits/7.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/digits/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.TestServer/wwwroot/digits/8.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/digits/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.TestServer/wwwroot/digits/9.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/dynamic-oopif.html: -------------------------------------------------------------------------------- 1 | <script> 2 | window.addEventListener('DOMContentLoaded', () => { 3 | const iframe = document.createElement('iframe'); 4 | const url = new URL(location.href); 5 | url.hostname = url.hostname === 'localhost' ? '127.0.0.1' : 'localhost'; 6 | url.pathname = '/oopif.html'; 7 | iframe.src = url.toString(); 8 | document.body.appendChild(iframe); 9 | }, false); 10 | </script> 11 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/empty.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.TestServer/wwwroot/empty.html -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/error.html: -------------------------------------------------------------------------------- 1 | <script> 2 | a(); 3 | 4 | function a() { 5 | b(); 6 | } 7 | 8 | function b() { 9 | c(); 10 | } 11 | 12 | function c() { 13 | throw new Error('Fancy error!'); 14 | } 15 | </script> 16 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/es6/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "sourceType": "module" 4 | } 5 | } -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/es6/es6import.js: -------------------------------------------------------------------------------- 1 | import num from './es6module.js'; 2 | window.__es6injected = num; -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/es6/es6module.js: -------------------------------------------------------------------------------- 1 | export default 42; -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/es6/es6pathimport.js: -------------------------------------------------------------------------------- 1 | import num from './es6/es6module.js'; 2 | window.__es6injected = num; -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.TestServer/wwwroot/favicon.ico -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/file-to-upload.txt: -------------------------------------------------------------------------------- 1 | contents of the file -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/firefox.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.TestServer/wwwroot/firefox.zip -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/frame-example.html: -------------------------------------------------------------------------------- 1 | <html> 2 | 3 | <body> 4 | <iframe src="https://example.com"></iframe> 5 | </body> 6 | 7 | </html> 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/frames/frame.html: -------------------------------------------------------------------------------- 1 | <link rel='stylesheet' href='./style.css'> 2 | <script src='./script.js' type='text/javascript'></script> 3 | <style> 4 | div { 5 | line-height: 18px; 6 | } 7 | </style> 8 | <div>Hi, I'm frame</div> 9 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/frames/frameset.html: -------------------------------------------------------------------------------- 1 | <frameset> 2 | <frameset> 3 | <frame src='./frame.html'></frame> 4 | <frame src='about:blank'></frame> 5 | </frameset> 6 | <frame src='/empty.html'></frame> 7 | <frame></frame> 8 | </frameset> 9 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/frames/one-frame-url-fragment.html: -------------------------------------------------------------------------------- 1 | <iframe src='./frame.html?param=value#fragment'></iframe> 2 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/frames/one-frame.html: -------------------------------------------------------------------------------- 1 | <iframe src='./frame.html'></iframe> 2 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/frames/script.js: -------------------------------------------------------------------------------- 1 | console.log('Cheers!'); 2 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/frames/style.css: -------------------------------------------------------------------------------- 1 | div { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/frames/two-frames.html: -------------------------------------------------------------------------------- 1 | <style> 2 | body { 3 | display: flex; 4 | flex-direction: column; 5 | } 6 | 7 | body iframe { 8 | flex-grow: 1; 9 | flex-shrink: 1; 10 | } 11 | </style> 12 | <iframe src='./frame.html' name='uno'></iframe> 13 | <iframe src='./frame.html' name='dos'></iframe> 14 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/global-var.html: -------------------------------------------------------------------------------- 1 | <script> 2 | var globalVar = 123; 3 | </script> -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/historyapi.html: -------------------------------------------------------------------------------- 1 | <script> 2 | window.addEventListener('DOMContentLoaded', () => { 3 | history.pushState({}, '', '#1'); 4 | }); 5 | </script> -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/injectedfile.js: -------------------------------------------------------------------------------- 1 | window.__injected = 42; 2 | window.__injectedError = new Error('hi'); -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/injectedstyle.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: red; 3 | } 4 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/inline-svg.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html lang="en"> 3 | <body> 4 | <svg> 5 | <circle cx="10" cy="10" r="10" /> 6 | </svg> 7 | 8 | <div style="margin-top: 5000px;"> 9 | <svg> 10 | <circle cx="10" cy="10" r="10" /> 11 | </svg> 12 | </div> 13 | </body> 14 | </html> 15 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/inner-frame1.html: -------------------------------------------------------------------------------- 1 | <script> 2 | window.addEventListener('DOMContentLoaded', () => { 3 | const iframe = document.createElement('iframe'); 4 | const url = new URL(location.href); 5 | url.hostname = 'inner-frame2.test'; 6 | url.pathname = '/inner-frame2.html'; 7 | iframe.src = url.toString(); 8 | document.body.appendChild(iframe); 9 | }, false); 10 | </script> 11 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/inner-frame2.html: -------------------------------------------------------------------------------- 1 | <button>click</button> 2 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/input/button.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <title>Button test</title> 5 | </head> 6 | <body> 7 | <script src="mouse-helper.js"></script> 8 | <button onclick="clicked();">Click target</button> 9 | <script> 10 | window.result = 'Was not clicked'; 11 | function clicked() { 12 | result = 'Clicked'; 13 | } 14 | </script> 15 | </body> 16 | </html> -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/input/fileupload.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <title>File upload test</title> 5 | </head> 6 | <body> 7 | <input type="file"> 8 | </body> 9 | </html> -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/input/rotatedButton.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <title>Rotated button test</title> 5 | </head> 6 | <body> 7 | <script src="mouse-helper.js"></script> 8 | <button onclick="clicked();">Click target</button> 9 | <style> 10 | button { 11 | transform: rotateY(180deg); 12 | } 13 | </style> 14 | <script> 15 | window.result = 'Was not clicked'; 16 | function clicked() { 17 | result = 'Clicked'; 18 | } 19 | </script> 20 | </body> 21 | </html> 22 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/input/textarea.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <title>Textarea test</title> 5 | </head> 6 | <body> 7 | <textarea rows="5" cols="20"></textarea> 8 | <script src='mouse-helper.js'></script> 9 | <script> 10 | globalThis.result = ''; 11 | globalThis.textarea = document.querySelector('textarea'); 12 | textarea.addEventListener('input', () => result = textarea.value, false); 13 | </script> 14 | </body> 15 | </html> 16 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/jscoverage/eval.html: -------------------------------------------------------------------------------- 1 | <script>eval('console.log("foo")')</script> 2 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/jscoverage/involved.html: -------------------------------------------------------------------------------- 1 | <script> 2 | function foo() { 3 | if (1 > 2) 4 | console.log(1); 5 | if (1 < 2) 6 | console.log(2); 7 | let x = 1 > 2 ? 'foo' : 'bar'; 8 | let y = 1 < 2 ? 'foo' : 'bar'; 9 | let z = () => {}; 10 | let q = () => {}; 11 | q(); 12 | } 13 | 14 | foo(); 15 | </script> 16 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/jscoverage/multiple.html: -------------------------------------------------------------------------------- 1 | <script src='script1.js'></script> 2 | <script src='script2.js'></script> 3 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/jscoverage/ranges.html: -------------------------------------------------------------------------------- 1 | <script> 2 | function unused(){}console.log('used!');if(true===false)console.log('unused!');</script> 3 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/jscoverage/script1.js: -------------------------------------------------------------------------------- 1 | console.log(3); 2 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/jscoverage/script2.js: -------------------------------------------------------------------------------- 1 | console.log(3); 2 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/jscoverage/simple.html: -------------------------------------------------------------------------------- 1 | <script> 2 | function foo() {function bar() { } console.log(1); } foo(); </script> 3 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/jscoverage/sourceurl.html: -------------------------------------------------------------------------------- 1 | <script> 2 | console.log(1); 3 | //# sourceURL=nicename.js 4 | </script> 5 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/jscoverage/unused.html: -------------------------------------------------------------------------------- 1 | <script>function foo() { }</script> 2 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/lazy-oopif-frame.html: -------------------------------------------------------------------------------- 1 | <iframe width="100%" height="300" src="about:blank"></iframe> 2 | <div style="height: 800vh"></div> 3 | <iframe width="100%" height="300" src='http://www.example.com' loading="lazy"></iframe> 4 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/main-frame.html: -------------------------------------------------------------------------------- 1 | <script> 2 | window.addEventListener('DOMContentLoaded', () => { 3 | const iframe = document.createElement('iframe'); 4 | const url = new URL(location.href); 5 | url.hostname = 'inner-frame1.test'; 6 | url.pathname = '/inner-frame1.html'; 7 | iframe.src = url.toString(); 8 | document.body.appendChild(iframe); 9 | }, false); 10 | </script> 11 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/mobile.html: -------------------------------------------------------------------------------- 1 | <meta name = "viewport" content = "initial-scale = 1, user-scalable = no"> 2 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/networkidle.html: -------------------------------------------------------------------------------- 1 | <script> 2 | async function sleep(delay) { 3 | return new Promise(resolve => setTimeout(resolve, delay)); 4 | } 5 | 6 | async function main() { 7 | const roundOne = Promise.all([ 8 | fetch('fetch-request-a.js'), 9 | fetch('fetch-request-b.js'), 10 | fetch('fetch-request-c.js'), 11 | ]); 12 | 13 | await roundOne; 14 | await sleep(50); 15 | await fetch('fetch-request-d.js'); 16 | } 17 | 18 | main(); 19 | </script> 20 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/one-style.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: pink; 3 | } 4 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/one-style.html: -------------------------------------------------------------------------------- 1 | <link rel='stylesheet' href='./one-style.css'> 2 | <div>hello, world!</div> 3 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/oopif.html: -------------------------------------------------------------------------------- 1 | <a id="navigate-within-document" href="#nav">Navigate within document</a> 2 | <a name="nav"></a> 3 | <script> 4 | fetch('oopif.html?requestFromOOPIF') 5 | </script> 6 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/pdf.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html lang="en"> 3 | <head> 4 | <meta charset="UTF-8" /> 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 6 | <title>PDF</title> 7 | </head> 8 | <body> 9 | <h1>PDF Content</h1> 10 | <section> 11 | <h1>PDF Subcontent 1</h1> 12 | </section> 13 | <section> 14 | <h1>PDF Subcontent 2</h1> 15 | </section> 16 | </body> 17 | </html> 18 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/picture.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <img 3 | srcset="logo-1x.png, logo-2x.png 2x, logo-3x.png 3x" 4 | src="logo-1x.png" 5 | height="320" 6 | width="320" /> 7 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/playground.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <title>Playground</title> 5 | </head> 6 | <body> 7 | <button>A button</button> 8 | <textarea>A text area</textarea> 9 | <div id="first">First div</div> 10 | <div id="second"> 11 | Second div 12 | <span class="inner">Inner span</span> 13 | </div> 14 | </body> 15 | </html> -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/popup/popup.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <title>Popup</title> 5 | </head> 6 | <body> 7 | I am a popup 8 | </body> 9 | </html> -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/popup/window-open.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <title>Popup test</title> 5 | </head> 6 | <body> 7 | <script> 8 | window.open('./popup.html'); 9 | </script> 10 | </body> 11 | </html> -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/pptr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.TestServer/wwwroot/pptr.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/prerender/index.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <head> 3 | <script> 4 | function addRules() { 5 | const script = document.createElement('script'); 6 | script.type = 'speculationrules'; 7 | script.innerText = ` 8 | { 9 | "prerender": [ 10 | {"source": "list", "urls": ["target.html"]} 11 | ] 12 | } 13 | `; 14 | document.head.append(script); 15 | } 16 | </script> 17 | </head> 18 | <body> 19 | <button onclick="addRules()">add rules</button> 20 | <a href="target.html">test</a> 21 | </body> 22 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/prerender/target.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <head> 3 | <script>fetch('target.html?fromPrerendered')</script> 4 | </head> 5 | <body>target<input></input></body> 6 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/resolution.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <style> 3 | p { 4 | color: transparent; 5 | } 6 | @media (resolution: 1dppx) { 7 | p { 8 | font-size: 1px; 9 | } 10 | } 11 | @media (resolution: 2dppx) { 12 | p { 13 | font-size: 2px; 14 | } 15 | } 16 | @media (resolution: 3dppx) { 17 | p { 18 | font-size: 3px; 19 | } 20 | } 21 | </style> 22 | <p>Test</p> 23 | 24 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/self-request.html: -------------------------------------------------------------------------------- 1 | <script> 2 | var req = new XMLHttpRequest(); 3 | req.open('GET', '/self-request.html'); 4 | req.send(null); 5 | </script> 6 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/serviceworkers/empty/sw.html: -------------------------------------------------------------------------------- 1 | <script> 2 | window.registrationPromise = navigator.serviceWorker.register('sw.js'); 3 | </script> -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/serviceworkers/empty/sw.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.TestServer/wwwroot/serviceworkers/empty/sw.js -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/serviceworkers/fetch/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: pink; 3 | } -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/serviceworkers/fetch/sw.html: -------------------------------------------------------------------------------- 1 | <link rel="stylesheet" href="./style.css"> 2 | <script> 3 | navigator.serviceWorker.register('sw.js'); 4 | window.activationPromise = new Promise(resolve => navigator.serviceWorker.oncontrollerchange = resolve); 5 | </script> -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/serviceworkers/fetch/sw.js: -------------------------------------------------------------------------------- 1 | self.addEventListener('fetch', event => { 2 | event.respondWith(fetch(event.request)); 3 | }); 4 | 5 | self.addEventListener('activate', event => { 6 | event.waitUntil(clients.claim()); 7 | }); -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/shadow.html: -------------------------------------------------------------------------------- 1 | <script> 2 | 3 | let h1 = null; 4 | let button = null; 5 | let clicked = false; 6 | 7 | window.addEventListener('DOMContentLoaded', () => { 8 | const shadowRoot = document.body.attachShadow({mode: 'open'}); 9 | h1 = document.createElement('h1'); 10 | h1.textContent = 'Hellow Shadow DOM v1'; 11 | button = document.createElement('button'); 12 | button.textContent = 'Click'; 13 | button.addEventListener('click', () => clicked = true); 14 | shadowRoot.appendChild(h1); 15 | shadowRoot.appendChild(button); 16 | }); 17 | </script> 18 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/simple.json: -------------------------------------------------------------------------------- 1 | {"foo": "bar"} 2 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/sw.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.TestServer/wwwroot/sw.js -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/tamperable.html: -------------------------------------------------------------------------------- 1 | <script> 2 | window.result = window.injected; 3 | </script> -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/title.html: -------------------------------------------------------------------------------- 1 | <title>Woof-Woof</title> 2 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/worker/worker.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <title>Worker test</title> 5 | </head> 6 | <body> 7 | <script> 8 | var worker = new Worker('worker.js'); 9 | worker.onmessage = function(message) { 10 | console.log(message.data); 11 | }; 12 | </script> 13 | </body> 14 | </html> -------------------------------------------------------------------------------- /lib/PuppeteerSharp.TestServer/wwwroot/worker/worker.js: -------------------------------------------------------------------------------- 1 | console.log('hello from the worker'); 2 | 3 | function workerFunction() { 4 | return 'worker function result'; 5 | } 6 | 7 | self.addEventListener('message', event => { 8 | console.log('got this data: ' + event.data); 9 | }); 10 | 11 | (async function() { 12 | while (true) { 13 | self.postMessage(workerFunction.toString()); 14 | await new Promise(x => setTimeout(x, 100)); 15 | } 16 | })(); -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests.DumpIO/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cs] 2 | 3 | # Use ConfigureAwait 4 | dotnet_diagnostic.CA2007.severity = none -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests.DumpIO/PuppeteerSharp.Tests.DumpIO.csproj: -------------------------------------------------------------------------------- 1 | <Project Sdk="Microsoft.NET.Sdk"> 2 | <PropertyGroup> 3 | <OutputType>Exe</OutputType> 4 | <TargetFramework>net8.0</TargetFramework> 5 | <LangVersion>12</LangVersion> 6 | </PropertyGroup> 7 | <ItemGroup> 8 | <ProjectReference Include="..\PuppeteerSharp\PuppeteerSharp.csproj" /> 9 | </ItemGroup> 10 | </Project> 11 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests.SingleFileDeployment/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cs] 2 | 3 | # Use ConfigureAwait 4 | dotnet_diagnostic.CA2007.severity = none -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests.SingleFileDeployment/Program.cs: -------------------------------------------------------------------------------- 1 | using PuppeteerSharp; 2 | 3 | Console.WriteLine(quot;AppDomain.BaseDirectory: {AppContext.BaseDirectory}"); 4 | var browserFetcher = new BrowserFetcher(); 5 | await browserFetcher.DownloadAsync(); 6 | await using var browser = await Puppeteer.LaunchAsync(new LaunchOptions { Headless = true }); 7 | await using var page = await browser.NewPageAsync(); 8 | await page.GoToAsync("http://www.google.com"); 9 | await page.ScreenshotAsync("google.jpg"); 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests.SingleFileDeployment/PuppeteerSharp.Tests.SingleFileDeployment.csproj: -------------------------------------------------------------------------------- 1 | <Project Sdk="Microsoft.NET.Sdk"> 2 | 3 | <PropertyGroup> 4 | <OutputType>Exe</OutputType> 5 | <TargetFramework>net8.0</TargetFramework> 6 | <ImplicitUsings>enable</ImplicitUsings> 7 | <Nullable>enable</Nullable> 8 | <LangVersion>12</LangVersion> 9 | </PropertyGroup> 10 | 11 | <ItemGroup> 12 | <ProjectReference Include="..\PuppeteerSharp\PuppeteerSharp.csproj" /> 13 | </ItemGroup> 14 | 15 | </Project> 16 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Assets/es6/es6import.js: -------------------------------------------------------------------------------- 1 | import num from './es6module.js'; 2 | window.__es6injected = num; -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Assets/es6/es6module.js: -------------------------------------------------------------------------------- 1 | export default 42; -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Assets/es6/es6pathimport.js: -------------------------------------------------------------------------------- 1 | import num from './es6/es6module.js'; 2 | window.__es6injected = num; -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Assets/file-to-upload.txt: -------------------------------------------------------------------------------- 1 | contents of the file -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Assets/injectedfile.js: -------------------------------------------------------------------------------- 1 | window.__injected = 42; 2 | window.__injectedError = new Error('hi'); -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Assets/injectedstyle.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: red; 3 | } -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Assets/one-style.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: pink; 3 | } 4 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Assets/one-style.html: -------------------------------------------------------------------------------- 1 | <link rel='stylesheet' href='./one-style.css'> 2 | <div>hello, world!</div> 3 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Assets/pptr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Assets/pptr.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Assets/simple-extension/content-script.js: -------------------------------------------------------------------------------- 1 | console.log('hey from the content-script'); 2 | self.thisIsTheContentScript = true; 3 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Assets/simple-extension/index.js: -------------------------------------------------------------------------------- 1 | // Mock script for service worker extension 2 | globalThis.MAGIC = 42; 3 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Assets/simple-extension/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Simple extension", 3 | "version": "0.1", 4 | "background": { 5 | "service_worker": "index.js" 6 | }, 7 | "content_scripts": [{ 8 | "matches": ["<all_urls>"], 9 | "css": [], 10 | "js": ["content-script.js"] 11 | }], 12 | "permissions": ["background", "activeTab"], 13 | "manifest_version": 3 14 | } 15 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/BrowserTests/BrowserVersionTests.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using NUnit.Framework; 3 | using PuppeteerSharp.Nunit; 4 | 5 | namespace PuppeteerSharp.Tests.BrowserTests 6 | { 7 | public class BrowserVersionTests : PuppeteerBrowserBaseTest 8 | { 9 | [Test, PuppeteerTest("browser.spec", "Browser.version", "should return version")] 10 | public async Task ShouldReturnVersion() 11 | { 12 | var version = await Browser.GetVersionAsync(); 13 | Assert.That(version, Is.Not.Empty); 14 | Assert.That(version.ToLower(), Does.Contain(PuppeteerTestAttribute.IsChrome ? "chrome" : "firefox")); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/BrowserTests/TargetTests.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using PuppeteerSharp.Nunit; 3 | 4 | namespace PuppeteerSharp.Tests.BrowserTests 5 | { 6 | public class TargetTests : PuppeteerBrowserBaseTest 7 | { 8 | public TargetTests() : base() 9 | { 10 | } 11 | 12 | [Test, PuppeteerTest("browser.spec", "Browser.target", "should return browser target")] 13 | public void ShouldReturnBrowserTarget() 14 | => Assert.That(Browser.Target.Type, Is.EqualTo(TargetType.Browser)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/DeviceRequestPromptTests/PromptDataConverter.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json; 2 | using PuppeteerSharp.Cdp.Messaging; 3 | using PuppeteerSharp.Helpers.Json; 4 | 5 | namespace PuppeteerSharp.Tests.DeviceRequestPromptTests; 6 | 7 | internal static class PromptDataConverter 8 | { 9 | public static JsonElement ToJsonElement(this DeviceAccessDeviceRequestPromptedResponse promptData) 10 | => JsonSerializer.SerializeToElement(promptData, JsonHelper.DefaultJsonSerializerSettings.Value); 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Issues/Issue0100.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using NUnit.Framework; 3 | 4 | namespace PuppeteerSharp.Tests.Issues 5 | { 6 | public class Issue0100 : PuppeteerBrowserContextBaseTest 7 | { 8 | public Issue0100() : base() 9 | { 10 | } 11 | 12 | public async Task PdfDarkskyShouldWork() 13 | { 14 | await using (var page = await Context.NewPageAsync()) 15 | { 16 | await page.GoToAsync("https://darksky.net/forecast/51.2211,4.3997/si12/en"); 17 | var pdf = await page.PdfDataAsync(); 18 | Assert.That(pdf, Is.Not.Null); 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Issues/Issue0128.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | 3 | namespace PuppeteerSharp.Tests.Issues 4 | { 5 | public class Issue0128 6 | { 7 | public void LauncherShouldFailGracefully() 8 | { 9 | Assert.ThrowsAsync<ProcessException>(async () => 10 | { 11 | var options = TestConstants.DefaultBrowserOptions(); 12 | options.Args = new[] { "--remote-debugging-port=-2" }; 13 | await Puppeteer.LaunchAsync(options, TestConstants.LoggerFactory); 14 | }); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Issues/Issue0648.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace PuppeteerSharp.Tests.Issues 4 | { 5 | public class Issue0648 : PuppeteerPageBaseTest 6 | { 7 | public Issue0648() : base() 8 | { 9 | } 10 | 11 | public async Task ShouldWork() 12 | { 13 | await Page.SetRequestInterceptionAsync(true); 14 | Page.Request += async (_, e) => await e.Request.ContinueAsync(); 15 | await Page.GoToAsync("https://www.google.com/search?q=firewall&oq=firewall&ie=UTF-8"); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Issues/Issue1895.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace PuppeteerSharp.Tests.Issues 4 | { 5 | public class Issue1895 : PuppeteerPageBaseTest 6 | { 7 | public Issue1895() : base() 8 | { 9 | } 10 | 11 | public async Task ItNavigatesToSannySoft() 12 | { 13 | await Page.GoToAsync("https://bot.sannysoft.com/"); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/LaunchOptionsTests.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | 3 | namespace PuppeteerSharp.Tests 4 | { 5 | public class LaunchOptionsTests 6 | { 7 | public void DisableHeadlessWhenDevtoolsEnabled() 8 | { 9 | var options = new LaunchOptions 10 | { 11 | Devtools = true 12 | }; 13 | 14 | Assert.That(options.Devtools, Is.True); 15 | Assert.That(options.Headless, Is.False); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/MouseTests/Dimensions.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Tests.MouseTests 2 | { 3 | public class Dimensions 4 | { 5 | public decimal X { get; set; } 6 | public decimal Y { get; set; } 7 | public decimal Width { get; set; } 8 | public decimal Height { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/NetworkTests/ResponseJsonTests.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json; 2 | using System.Threading.Tasks; 3 | using NUnit.Framework; 4 | using PuppeteerSharp.Nunit; 5 | 6 | namespace PuppeteerSharp.Tests.NetworkTests 7 | { 8 | public class ResponseJsonTests : PuppeteerPageBaseTest 9 | { 10 | [Test, PuppeteerTest("network.spec", "network Response.json", "should work")] 11 | public async Task ShouldWork() 12 | { 13 | var response = await Page.GoToAsync(TestConstants.ServerUrl + "/simple.json"); 14 | 15 | Assert.That((await response.JsonAsync<JsonElement>()).GetProperty("foo").GetString(), Is.EqualTo("bar")); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/PageExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | 4 | namespace PuppeteerSharp.Tests 5 | { 6 | public static class PageExtensions 7 | { 8 | public static IEnumerable<IFrame> ChildFrames(this IPage page) => page.Frames.Where(f => f.ParentFrame == page.MainFrame); 9 | 10 | public static IFrame FirstChildFrame(this IPage page) => page.Frames.FirstOrDefault(f => f.ParentFrame == page.MainFrame); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/PageTests/BrowserContextTests.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using PuppeteerSharp.Nunit; 3 | 4 | namespace PuppeteerSharp.Tests.PageTests 5 | { 6 | public class BrowserContextTests : PuppeteerPageBaseTest 7 | { 8 | public BrowserContextTests() : base() 9 | { 10 | } 11 | 12 | [Test, PuppeteerTest("page.spec", "Page Page.browserContext", "should return the correct browser context instance")] 13 | public void ShouldReturnTheCorrectBrowserInstance() => Assert.That(Page.BrowserContext, Is.SameAs(Context)); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/PageTests/BrowserTests.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using PuppeteerSharp.Nunit; 3 | 4 | namespace PuppeteerSharp.Tests.PageTests 5 | { 6 | public class BrowserTests : PuppeteerPageBaseTest 7 | { 8 | public BrowserTests() : base() 9 | { 10 | } 11 | 12 | [Test, PuppeteerTest("page.spec", "Page Page.browser", "should return the correct browser instance")] 13 | public void ShouldReturnTheCorrectBrowserInstance() => Assert.That(Page.Browser, Is.SameAs(Browser)); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/PageTests/TitleTests.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using NUnit.Framework; 3 | using PuppeteerSharp.Nunit; 4 | 5 | namespace PuppeteerSharp.Tests.PageTests 6 | { 7 | public class TitleTests : PuppeteerPageBaseTest 8 | { 9 | public TitleTests() : base() 10 | { 11 | } 12 | 13 | [Test, PuppeteerTest("page.spec", "Page Page.title", "should return the page title")] 14 | public async Task ShouldReturnThePageTitle() 15 | { 16 | await Page.GoToAsync(TestConstants.ServerUrl + "/title.html"); 17 | Assert.That(await Page.GetTitleAsync(), Is.EqualTo("Woof-Woof")); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/PageTests/UrlTests.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using NUnit.Framework; 3 | using PuppeteerSharp.Nunit; 4 | 5 | namespace PuppeteerSharp.Tests.PageTests 6 | { 7 | public class UrlTests : PuppeteerPageBaseTest 8 | { 9 | public UrlTests() : base() 10 | { 11 | } 12 | 13 | [Test, PuppeteerTest("page.spec", "Page Page.url", "should work")] 14 | public async Task ShouldWork() 15 | { 16 | Assert.That(Page.Url, Is.EqualTo(TestConstants.AboutBlank)); 17 | await Page.GoToAsync(TestConstants.EmptyPage); 18 | Assert.That(Page.Url, Is.EqualTo(TestConstants.EmptyPage)); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/PuppeteerBrowserContextBaseTest.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using NUnit.Framework; 3 | 4 | namespace PuppeteerSharp.Tests 5 | { 6 | public class PuppeteerBrowserContextBaseTest : PuppeteerBrowserBaseTest 7 | { 8 | protected IBrowserContext Context { get; set; } 9 | 10 | [SetUp] 11 | public async Task CreateContextAsync() 12 | { 13 | Context = await Browser.CreateBrowserContextAsync(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/0.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/device-pixel-ratio1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/device-pixel-ratio1.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/device-pixel-ratio2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/device-pixel-ratio2.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/device-pixel-ratio3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/device-pixel-ratio3.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/grid-cell-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/grid-cell-0.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/grid-cell-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/grid-cell-1.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/grid-cell-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/grid-cell-2.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/grid-cell-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/grid-cell-3.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/mock-binary-response.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/mock-binary-response.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-clip-odd-size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-clip-odd-size.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-clip-rect-scale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-clip-rect-scale.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-clip-rect-scale2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-clip-rect-scale2.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-clip-rect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-clip-rect.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-element-bounding-box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-element-bounding-box.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-element-fractional-offset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-element-fractional-offset.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-element-fractional.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-element-fractional.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-element-larger-than-viewport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-element-larger-than-viewport.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-element-padding-border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-element-padding-border.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-element-rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-element-rotate.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-element-scrolled-into-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-element-scrolled-into-view.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-grid-fullpage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-grid-fullpage.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-offscreen-clip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-offscreen-clip.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-sanity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/screenshot-sanity.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/test.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/transparent.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/vision-deficiency-achromatopsia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/vision-deficiency-achromatopsia.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/vision-deficiency-blurredVision.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/vision-deficiency-blurredVision.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/vision-deficiency-deuteranopia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/vision-deficiency-deuteranopia.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/vision-deficiency-protanopia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/vision-deficiency-protanopia.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/vision-deficiency-tritanopia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/vision-deficiency-tritanopia.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/white.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-chromium/white.jpg -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/0.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/device-pixel-ratio1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/device-pixel-ratio1.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/device-pixel-ratio2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/device-pixel-ratio2.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/device-pixel-ratio3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/device-pixel-ratio3.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/grid-cell-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/grid-cell-0.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/grid-cell-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/grid-cell-1.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-clip-odd-size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-clip-odd-size.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-clip-rect-scale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-clip-rect-scale.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-clip-rect-scale2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-clip-rect-scale2.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-clip-rect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-clip-rect.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-element-bounding-box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-element-bounding-box.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-element-fractional-offset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-element-fractional-offset.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-element-fractional.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-element-fractional.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-element-larger-than-viewport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-element-larger-than-viewport.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-element-padding-border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-element-padding-border.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-element-rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-element-rotate.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-element-scrolled-into-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-element-scrolled-into-view.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-grid-fullpage-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-grid-fullpage-2.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-grid-fullpage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-grid-fullpage.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-offscreen-clip-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-offscreen-clip-2.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-offscreen-clip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-offscreen-clip.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-sanity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/screenshot-sanity.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/transparent.png -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/white.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/PuppeteerSharp.Tests/Screenshots/golden-firefox/white.jpg -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/nested-frames.txt: -------------------------------------------------------------------------------- 1 | http://localhost:<PORT>/frames/nested-frames.html 2 | http://localhost:<PORT>/frames/two-frames.html 3 | http://localhost:<PORT>/frames/frame.html 4 | http://localhost:<PORT>/frames/frame.html 5 | http://localhost:<PORT>/frames/frame.html -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/Screenshots/reconnect-nested-frames.txt: -------------------------------------------------------------------------------- 1 | http://localhost:<PORT>/frames/nested-frames.html 2 | http://localhost:<PORT>/frames/two-frames.html 3 | http://localhost:<PORT>/frames/frame.html 4 | http://localhost:<PORT>/frames/frame.html 5 | http://localhost:<PORT>/frames/frame.html -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/test.runsettings: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" ?> 2 | <RunSettings> 3 | <!-- Configurations that affect the Test Framework --> 4 | <RunConfiguration> 5 | <TestSessionTimeout>3600000</TestSessionTimeout> 6 | </RunConfiguration> 7 | </RunSettings> 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp.Tests/xunit.runner.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", 3 | "diagnosticMessages": true, 4 | "parallelizeAssembly": false, 5 | "maxParallelThreads": -1, 6 | "longRunningTestSeconds": 5, 7 | "shadowCopy": false 8 | } 9 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/AriaQueryOption.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | internal class AriaQueryOption 4 | { 5 | public string Name { get; set; } 6 | 7 | public string Role { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/BoxModelPoint.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | /// <summary> 4 | /// Represents a point. 5 | /// </summary> 6 | public record BoxModelPoint 7 | { 8 | /// <summary> 9 | /// The X coordinate. 10 | /// </summary> 11 | public decimal X { get; set; } 12 | 13 | /// <summary> 14 | /// The y coordinate. 15 | /// </summary> 16 | public decimal Y { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/BrowserContextOptions.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | /// <summary> 4 | /// BrowserContext options. 5 | /// </summary> 6 | public class BrowserContextOptions 7 | { 8 | /// <summary> 9 | /// Proxy server with optional port to use for all requests. 10 | /// Username and password can be set in <see cref="IPage.AuthenticateAsync(Credentials)"/>. 11 | /// </summary> 12 | public string ProxyServer { get; set; } 13 | 14 | /// <summary> 15 | /// Bypass the proxy for the given semi-colon-separated list of hosts. 16 | /// </summary> 17 | public string[] ProxyBypassList { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/BrowserData/ChromeGoodVersionsResult.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PuppeteerSharp.BrowserData 4 | { 5 | internal class ChromeGoodVersionsResult 6 | { 7 | public Dictionary<string, ChromeGoodVersionsResultVersion> Channels { get; set; } 8 | 9 | internal class ChromeGoodVersionsResultVersion 10 | { 11 | public string Version { get; set; } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/BrowserData/ChromeReleaseChannel.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.BrowserData 2 | { 3 | /// <summary> 4 | /// Chrome release channels. 5 | /// </summary> 6 | public enum ChromeReleaseChannel 7 | { 8 | /// <summary> 9 | /// Stable. 10 | /// </summary> 11 | Stable = 0, 12 | 13 | /// <summary> 14 | /// Dev. 15 | /// </summary> 16 | Dev = 1, 17 | 18 | /// <summary> 19 | /// Canary. 20 | /// </summary> 21 | Canary = 2, 22 | 23 | /// <summary> 24 | /// Beta. 25 | /// </summary> 26 | Beta = 3, 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/BufferException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PuppeteerSharp 4 | { 5 | [Serializable] 6 | internal class BufferException : PuppeteerException 7 | { 8 | public BufferException() 9 | { 10 | } 11 | 12 | public BufferException(string message) : base(message) 13 | { 14 | } 15 | 16 | public BufferException(string message, Exception innerException) : base(message, innerException) 17 | { 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/AccessibilityQueryAXTreeRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class AccessibilityQueryAXTreeRequest 4 | { 5 | public string ObjectId { get; set; } 6 | 7 | public string AccessibleName { get; set; } 8 | 9 | public string Role { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/AccessibilityQueryAXTreeResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using static PuppeteerSharp.Cdp.Messaging.AccessibilityGetFullAXTreeResponse; 3 | 4 | namespace PuppeteerSharp.Cdp.Messaging 5 | { 6 | internal class AccessibilityQueryAXTreeResponse 7 | { 8 | public IEnumerable<AXTreeNode> Nodes { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/BasicFrameResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class BasicFrameResponse 4 | { 5 | public string FrameId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/BrowserGetVersionResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class BrowserGetVersionResponse 4 | { 5 | public string UserAgent { get; set; } 6 | 7 | public string Product { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/BrowserGrantPermissionsRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class BrowserGrantPermissionsRequest 4 | { 5 | public string Origin { get; set; } 6 | 7 | public string BrowserContextId { get; set; } 8 | 9 | public OverridePermission[] Permissions { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/BrowserResetPermissionsRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class BrowserResetPermissionsRequest 4 | { 5 | public string BrowserContextId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/CSSStopRuleUsageTrackingResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class CSSStopRuleUsageTrackingResponse 4 | { 5 | public CSSStopRuleUsageTrackingRuleUsage[] RuleUsage { get; set; } 6 | 7 | internal class CSSStopRuleUsageTrackingRuleUsage 8 | { 9 | public string StyleSheetId { get; set; } 10 | 11 | public int StartOffset { get; set; } 12 | 13 | public int EndOffset { get; set; } 14 | 15 | public bool Used { get; set; } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/CSSStyleSheetAddedResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class CSSStyleSheetAddedResponse 4 | { 5 | public CSSStyleSheetAddedResponseHeader Header { get; set; } 6 | 7 | public class CSSStyleSheetAddedResponseHeader 8 | { 9 | public string StyleSheetId { get; set; } 10 | 11 | public string SourceURL { get; set; } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/CertificateErrorResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class CertificateErrorResponse 4 | { 5 | public int EventId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/ConnectionError.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class ConnectionError 4 | { 5 | public string Message { get; set; } 6 | 7 | public string Data { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/ConnectionRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class ConnectionRequest 4 | { 5 | public int Id { get; set; } 6 | 7 | public string Method { get; set; } 8 | 9 | public object Params { get; set; } 10 | 11 | public string SessionId { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/ConnectionResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json; 2 | 3 | namespace PuppeteerSharp.Cdp.Messaging 4 | { 5 | internal class ConnectionResponse 6 | { 7 | public int? Id { get; set; } 8 | 9 | public ConnectionError Error { get; set; } 10 | 11 | public JsonElement? Result { get; set; } 12 | 13 | public string Method { get; set; } 14 | 15 | public JsonElement? Params { get; set; } 16 | 17 | public string SessionId { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/ConnectionResponseParams.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class ConnectionResponseParams 4 | { 5 | public string SessionId { get; set; } 6 | 7 | public string Message { get; set; } 8 | 9 | public string Stream { get; set; } 10 | 11 | public TargetInfo TargetInfo { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/ContinueWithAuthRequest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PuppeteerSharp.Cdp.Messaging 4 | { 5 | internal class ContinueWithAuthRequest 6 | { 7 | public string RequestId { get; set; } 8 | 9 | public ContinueWithAuthRequestChallengeResponse AuthChallengeResponse { get; set; } 10 | 11 | public string RawResponse { get; set; } 12 | 13 | public string ErrorReason { get; set; } 14 | 15 | public string Url { get; set; } 16 | 17 | public string Method { get; set; } 18 | 19 | public string PostData { get; set; } 20 | 21 | public Dictionary<string, string> Headers { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/ContinueWithAuthRequestChallengeResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class ContinueWithAuthRequestChallengeResponse 4 | { 5 | public string Response { get; set; } 6 | 7 | public string Username { get; set; } 8 | 9 | public string Password { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/CreateBrowserContextResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | using PuppeteerSharp.Helpers.Json; 3 | 4 | namespace PuppeteerSharp.Cdp.Messaging 5 | { 6 | internal class CreateBrowserContextResponse 7 | { 8 | [JsonConverter(typeof(AnyTypeToStringConverter))] 9 | public string BrowserContextId { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/CssGetStyleSheetTextRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class CssGetStyleSheetTextRequest 4 | { 5 | public string StyleSheetId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/CssGetStyleSheetTextResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class CssGetStyleSheetTextResponse 4 | { 5 | public string Text { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/DebuggerGetScriptSourceRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class DebuggerGetScriptSourceRequest 4 | { 5 | public string ScriptId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/DebuggerGetScriptSourceResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class DebuggerGetScriptSourceResponse 4 | { 5 | public string ScriptSource { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/DebuggerScriptParsedResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class DebuggerScriptParsedResponse 4 | { 5 | public string Url { get; set; } 6 | 7 | public string ScriptId { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/DebuggerSetSkipAllPausesRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class DebuggerSetSkipAllPausesRequest 4 | { 5 | public bool Skip { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/DeviceAccessDeviceRequestPromptedResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class DeviceAccessDeviceRequestPromptedResponse 4 | { 5 | public string Id { get; set; } 6 | 7 | public DeviceAccessDevice[] Devices { get; set; } = []; 8 | 9 | internal class DeviceAccessDevice 10 | { 11 | public string Name { get; set; } 12 | 13 | public string Id { get; set; } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/DomDescribeNodeRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class DomDescribeNodeRequest 4 | { 5 | public string ObjectId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/DomDescribeNodeResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json; 2 | 3 | namespace PuppeteerSharp.Cdp.Messaging 4 | { 5 | internal class DomDescribeNodeResponse 6 | { 7 | public DomNode Node { get; set; } 8 | 9 | internal class DomNode 10 | { 11 | public string FrameId { get; set; } 12 | 13 | public JsonElement BackendNodeId { get; set; } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/DomGetBoxModelRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class DomGetBoxModelRequest 4 | { 5 | public string ObjectId { get; set; } 6 | 7 | public object BackendNodeId { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/DomGetBoxModelResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class DomGetBoxModelResponse 4 | { 5 | public BoxModelResponseModel Model { get; set; } 6 | 7 | public class BoxModelResponseModel 8 | { 9 | public decimal[] Content { get; set; } 10 | 11 | public decimal[] Padding { get; set; } 12 | 13 | public decimal[] Border { get; set; } 14 | 15 | public decimal[] Margin { get; set; } 16 | 17 | public int Width { get; set; } 18 | 19 | public int Height { get; set; } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/DomGetContentQuadsRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class DomGetContentQuadsRequest 4 | { 5 | public string ObjectId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/DomGetFrameOwnerRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class DomGetFrameOwnerRequest 4 | { 5 | public string FrameId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/DomGetFrameOwnerResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class DomGetFrameOwnerResponse 4 | { 5 | public object BackendNodeId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/DomResolveNodeRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class DomResolveNodeRequest 4 | { 5 | public object BackendNodeId { get; set; } 6 | 7 | public int ExecutionContextId { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/DomResolveNodeResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class DomResolveNodeResponse 4 | { 5 | public RemoteObject Object { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/DomScrollIntoViewIfNeededRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class DomScrollIntoViewIfNeededRequest 4 | { 5 | public string ObjectId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/DomSetFileInputFilesRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class DomSetFileInputFilesRequest 4 | { 5 | public string ObjectId { get; set; } 6 | 7 | public string[] Files { get; set; } 8 | 9 | public object BackendNodeId { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/EmulateTimezoneRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class EmulateTimezoneRequest 4 | { 5 | public string TimezoneId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/EmulationSetCPUThrottlingRateRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class EmulationSetCPUThrottlingRateRequest 4 | { 5 | public decimal Rate { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/EmulationSetDefaultBackgroundColorOverrideColor.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class EmulationSetDefaultBackgroundColorOverrideColor 4 | { 5 | public int R { get; set; } 6 | 7 | public int B { get; set; } 8 | 9 | public int A { get; set; } 10 | 11 | public int G { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/EmulationSetDefaultBackgroundColorOverrideRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class EmulationSetDefaultBackgroundColorOverrideRequest 4 | { 5 | public EmulationSetDefaultBackgroundColorOverrideColor Color { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/EmulationSetDeviceMetricsOverrideRequest.cs: -------------------------------------------------------------------------------- 1 | using PuppeteerSharp.Media; 2 | 3 | namespace PuppeteerSharp.Cdp.Messaging 4 | { 5 | internal class EmulationSetDeviceMetricsOverrideRequest 6 | { 7 | public bool Mobile { get; set; } 8 | 9 | public int Width { get; set; } 10 | 11 | public int Height { get; set; } 12 | 13 | public double DeviceScaleFactor { get; set; } 14 | 15 | public ScreenOrientation ScreenOrientation { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/EmulationSetEmulatedMediaFeatureRequest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PuppeteerSharp.Cdp.Messaging 4 | { 5 | internal class EmulationSetEmulatedMediaFeatureRequest 6 | { 7 | public IEnumerable<MediaFeatureValue> Features { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/EmulationSetEmulatedMediaTypeRequest.cs: -------------------------------------------------------------------------------- 1 | using PuppeteerSharp.Media; 2 | 3 | namespace PuppeteerSharp.Cdp.Messaging 4 | { 5 | internal class EmulationSetEmulatedMediaTypeRequest 6 | { 7 | public MediaType Media { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/EmulationSetEmulatedVisionDeficiencyRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class EmulationSetEmulatedVisionDeficiencyRequest 4 | { 5 | public VisionDeficiency Type { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/EmulationSetIdleOverrideRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class EmulationSetIdleOverrideRequest 4 | { 5 | public bool IsUserActive { get; set; } 6 | 7 | public bool IsScreenUnlocked { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/EmulationSetScriptExecutionDisabledRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class EmulationSetScriptExecutionDisabledRequest 4 | { 5 | public bool Value { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/EmulationSetTouchEmulationEnabledRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class EmulationSetTouchEmulationEnabledRequest 4 | { 5 | public string Configuration { get; set; } 6 | 7 | public bool Enabled { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/EvaluateExceptionResponseDetails.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class EvaluateExceptionResponseDetails 4 | { 5 | public EvaluateExceptionResponseInfo Exception { get; set; } 6 | 7 | public string Text { get; set; } 8 | 9 | public EvaluateExceptionResponseStackTrace StackTrace { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/EvaluateExceptionResponseInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | using PuppeteerSharp.Helpers.Json; 3 | 4 | namespace PuppeteerSharp.Cdp.Messaging 5 | { 6 | internal class EvaluateExceptionResponseInfo 7 | { 8 | public string Description { get; set; } 9 | 10 | [JsonConverter(typeof(AnyTypeToStringConverter))] 11 | public string Value { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/EvaluateExceptionResponseStackTrace.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class EvaluateExceptionResponseStackTrace 4 | { 5 | public EvaluationExceptionResponseCallFrame[] CallFrames { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/EvaluateHandleResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class EvaluateHandleResponse 4 | { 5 | public EvaluateExceptionResponseDetails ExceptionDetails { get; set; } 6 | 7 | public RemoteObject Result { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/EvaluationExceptionResponseCallFrame.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class EvaluationExceptionResponseCallFrame 4 | { 5 | public int ColumnNumber { get; set; } 6 | 7 | public int LineNumber { get; set; } 8 | 9 | public string Url { get; set; } 10 | 11 | public string FunctionName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/FetchContinueRequestRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class FetchContinueRequestRequest 4 | { 5 | public string RequestId { get; set; } 6 | 7 | public string Url { get; set; } 8 | 9 | public string Method { get; set; } 10 | 11 | public string PostData { get; set; } 12 | 13 | public Header[] Headers { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/FetchEnableRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class FetchEnableRequest 4 | { 5 | public bool HandleAuthRequests { get; set; } 6 | 7 | public Pattern[] Patterns { get; set; } 8 | 9 | internal class Pattern(string urlPattern) 10 | { 11 | public string UrlPattern { get; set; } = urlPattern; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/FetchFailRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class FetchFailRequest 4 | { 5 | public string RequestId { get; set; } 6 | 7 | public string ErrorReason { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/FetchRequestPausedResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class FetchRequestPausedResponse : RequestWillBeSentResponse 4 | { 5 | public ResourceType? ResourceType { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/GetBrowserContextsResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class GetBrowserContextsResponse 4 | { 5 | public string[] BrowserContextIds { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/GetContentQuadsResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class GetContentQuadsResponse 4 | { 5 | public decimal[][] Quads { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/Header.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class Header 4 | { 5 | public string Name { get; set; } 6 | 7 | public string Value { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/IOCloseRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class IOCloseRequest 4 | { 5 | public string Handle { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/IOReadRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class IOReadRequest 4 | { 5 | public string Handle { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/IOReadResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class IOReadResponse 4 | { 5 | public bool Eof { get; set; } 6 | 7 | public string Data { get; set; } 8 | 9 | public bool Base64Encoded { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/InputDispatchDragEventRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class InputDispatchDragEventRequest 4 | { 5 | public DragEventType Type { get; set; } 6 | 7 | public decimal X { get; set; } 8 | 9 | public decimal Y { get; set; } 10 | 11 | public int Modifiers { get; set; } 12 | 13 | public DragData Data { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/InputDispatchTouchEventRequest.cs: -------------------------------------------------------------------------------- 1 | using PuppeteerSharp.Input; 2 | 3 | namespace PuppeteerSharp.Cdp.Messaging 4 | { 5 | internal class InputDispatchTouchEventRequest 6 | { 7 | public string Type { get; internal set; } 8 | 9 | public TouchPoint[] TouchPoints { get; set; } 10 | 11 | public int Modifiers { get; internal set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/InputInsertTextRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class InputInsertTextRequest 4 | { 5 | public string Text { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/InputSetInterceptDragsRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class InputSetInterceptDragsRequest 4 | { 5 | public bool Enabled { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/LifecycleEventResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class LifecycleEventResponse 4 | { 5 | public string FrameId { get; set; } 6 | 7 | public string LoaderId { get; set; } 8 | 9 | public string Name { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/LoadingFailedEventResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class LoadingFailedEventResponse 4 | { 5 | public string RequestId { get; set; } 6 | 7 | public string ErrorText { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/LoadingFinishedEventResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class LoadingFinishedEventResponse 4 | { 5 | public string RequestId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/LogEntryAddedResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class LogEntryAddedResponse 4 | { 5 | public LogEntry Entry { get; set; } 6 | 7 | internal class LogEntry 8 | { 9 | public LogSource Source { get; set; } 10 | 11 | public RemoteObject[] Args { get; set; } 12 | 13 | public ConsoleType Level { get; set; } 14 | 15 | public string Text { get; set; } 16 | 17 | public string URL { get; set; } 18 | 19 | public int? LineNumber { get; set; } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/LogSource.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | using PuppeteerSharp.Helpers.Json; 3 | 4 | namespace PuppeteerSharp.Cdp.Messaging; 5 | 6 | [JsonConverter(typeof(JsonStringEnumMemberConverter<LogSource>))] 7 | internal enum LogSource 8 | { 9 | Xml = 0, 10 | Javascript, 11 | Network, 12 | Storage, 13 | Appcache, 14 | Rendering, 15 | Security, 16 | Deprecation, 17 | Worker, 18 | Violation, 19 | Intervention, 20 | Recommendation, 21 | Other, 22 | } 23 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/NavigatedWithinDocumentResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class NavigatedWithinDocumentResponse 4 | { 5 | public string FrameId { get; set; } 6 | 7 | public string Url { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/NavigationType.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | using PuppeteerSharp.Helpers.Json; 3 | 4 | namespace PuppeteerSharp.Cdp.Messaging; 5 | 6 | /// <summary> 7 | /// Navigation types. 8 | /// </summary> 9 | [JsonConverter(typeof(JsonStringEnumMemberConverter<NavigationType>))] 10 | public enum NavigationType 11 | { 12 | /// <summary> 13 | /// Normal navigation. 14 | /// </summary> 15 | Navigation, 16 | 17 | /// <summary> 18 | /// Back forward cache restore. 19 | /// </summary> 20 | BackForwardCacheRestore, 21 | } 22 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/NetworkEmulateNetworkConditionsRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class NetworkEmulateNetworkConditionsRequest 4 | { 5 | public bool Offline { get; set; } 6 | 7 | public double Latency { get; set; } 8 | 9 | public double DownloadThroughput { get; set; } 10 | 11 | public double UploadThroughput { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/NetworkGetCookiesRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class NetworkGetCookiesRequest 4 | { 5 | public string[] Urls { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/NetworkGetCookiesResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class NetworkGetCookiesResponse 4 | { 5 | public CookieParam[] Cookies { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/NetworkGetResponseBodyRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class NetworkGetResponseBodyRequest 4 | { 5 | public string RequestId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/NetworkGetResponseBodyResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class NetworkGetResponseBodyResponse 4 | { 5 | public string Body { get; set; } 6 | 7 | public bool Base64Encoded { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/NetworkSetCacheDisabledRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class NetworkSetCacheDisabledRequest(bool cacheDisabled) 4 | { 5 | public bool CacheDisabled { get; set; } = cacheDisabled; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/NetworkSetCookiesRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class NetworkSetCookiesRequest 4 | { 5 | public CookieParam[] Cookies { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/NetworkSetExtraHTTPHeadersRequest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PuppeteerSharp.Cdp.Messaging 4 | { 5 | internal class NetworkSetExtraHTTPHeadersRequest(Dictionary<string, string> headers) 6 | { 7 | public Dictionary<string, string> Headers { get; set; } = headers; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/NetworkSetUserAgentOverrideRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class NetworkSetUserAgentOverrideRequest 4 | { 5 | public string UserAgent { get; set; } 6 | 7 | public UserAgentMetadata UserAgentMetadata { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageAddScriptToEvaluateOnNewDocumentRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class PageAddScriptToEvaluateOnNewDocumentRequest 4 | { 5 | public string Source { get; set; } 6 | 7 | public string WorldName { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageAddScriptToEvaluateOnNewDocumentResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging; 2 | 3 | internal class PageAddScriptToEvaluateOnNewDocumentResponse 4 | { 5 | public string Identifier { get; set; } 6 | } 7 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageCaptureScreenshotRequest.cs: -------------------------------------------------------------------------------- 1 | using PuppeteerSharp.Media; 2 | 3 | namespace PuppeteerSharp.Cdp.Messaging 4 | { 5 | internal class PageCaptureScreenshotRequest 6 | { 7 | public string Format { get; set; } 8 | 9 | public int Quality { get; set; } 10 | 11 | public Clip Clip { get; set; } 12 | 13 | public bool CaptureBeyondViewport { get; set; } 14 | 15 | public bool? FromSurface { get; set; } 16 | 17 | public bool? OptimizeForSpeed { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageCaptureScreenshotResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class PageCaptureScreenshotResponse 4 | { 5 | public string Data { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageConsoleResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class PageConsoleResponse 4 | { 5 | public ConsoleType Type { get; set; } 6 | 7 | public RemoteObject[] Args { get; set; } 8 | 9 | public int ExecutionContextId { get; set; } 10 | 11 | public StackTrace StackTrace { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageCreateIsolatedWorldRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class PageCreateIsolatedWorldRequest 4 | { 5 | public string FrameId { get; set; } 6 | 7 | public string WorldName { get; set; } 8 | 9 | public bool GrantUniveralAccess { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageFileChooserOpenedResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class PageFileChooserOpenedResponse 4 | { 5 | public string Mode { get; set; } 6 | 7 | public string FrameId { get; set; } 8 | 9 | public object BackendNodeId { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageFrameAttachedResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class PageFrameAttachedResponse 4 | { 5 | public string FrameId { get; set; } 6 | 7 | public string ParentFrameId { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageFrameNavigatedResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging; 2 | 3 | internal class PageFrameNavigatedResponse 4 | { 5 | public FramePayload Frame { get; set; } 6 | 7 | public NavigationType Type { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageGetFrameTree.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class PageGetFrameTree 4 | { 5 | public FramePayload Frame { get; set; } 6 | 7 | public PageGetFrameTree[] ChildFrames { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageGetFrameTreeResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class PageGetFrameTreeResponse 4 | { 5 | public PageGetFrameTree FrameTree { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageGetNavigationHistoryResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PuppeteerSharp.Cdp.Messaging 4 | { 5 | internal class PageGetNavigationHistoryResponse 6 | { 7 | public int CurrentIndex { get; set; } 8 | 9 | public List<HistoryEntry> Entries { get; set; } 10 | 11 | internal class HistoryEntry 12 | { 13 | public int Id { get; set; } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageHandleFileChooserRequest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PuppeteerSharp.Cdp.Messaging 4 | { 5 | internal class PageHandleFileChooserRequest 6 | { 7 | public FileChooserAction Action { get; set; } 8 | 9 | public IEnumerable<string> Files { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageHandleJavaScriptDialogRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class PageHandleJavaScriptDialogRequest 4 | { 5 | public bool Accept { get; set; } 6 | 7 | public string PromptText { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageJavascriptDialogOpeningResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class PageJavascriptDialogOpeningResponse 4 | { 5 | public DialogType Type { get; set; } 6 | 7 | public string DefaultPrompt { get; set; } = string.Empty; 8 | 9 | public string Message { get; set; } = string.Empty; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageNavigateRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class PageNavigateRequest 4 | { 5 | public string Url { get; set; } 6 | 7 | public string Referrer { get; set; } 8 | 9 | public string FrameId { get; set; } 10 | 11 | public string ReferrerPolicy { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageNavigateResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class PageNavigateResponse 4 | { 5 | public string ErrorText { get; set; } 6 | 7 | public string LoaderId { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageNavigateToHistoryEntryRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class PageNavigateToHistoryEntryRequest 4 | { 5 | public int EntryId { get; internal set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PagePrintToPDFResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class PagePrintToPDFResponse 4 | { 5 | public string Data { get; set; } 6 | 7 | public string Stream { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageReloadRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class PageReloadRequest 4 | { 5 | public string FrameId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageRemoveScriptToEvaluateOnNewDocumentRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging; 2 | 3 | internal class PageRemoveScriptToEvaluateOnNewDocumentRequest 4 | { 5 | public string Identifier { get; set; } 6 | } 7 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageSetBypassCSPRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class PageSetBypassCSPRequest 4 | { 5 | public bool Enabled { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageSetInterceptFileChooserDialog.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class PageSetInterceptFileChooserDialog 4 | { 5 | public bool Enabled { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PageSetLifecycleEventsEnabledRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class PageSetLifecycleEventsEnabledRequest 4 | { 5 | public bool Enabled { get; internal set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PerformanceGetMetricsResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PuppeteerSharp.Cdp.Messaging 4 | { 5 | internal class PerformanceGetMetricsResponse 6 | { 7 | public List<Metric> Metrics { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/PerformanceMetricsResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PuppeteerSharp.Cdp.Messaging 4 | { 5 | internal class PerformanceMetricsResponse 6 | { 7 | public string Title { get; set; } 8 | 9 | public List<Metric> Metrics { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/ProfilerStartPreciseCoverageRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class ProfilerStartPreciseCoverageRequest 4 | { 5 | public bool CallCount { get; set; } 6 | 7 | public bool Detailed { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/ProfilerTakePreciseCoverageResponse.cs: -------------------------------------------------------------------------------- 1 | using PuppeteerSharp.PageCoverage; 2 | 3 | namespace PuppeteerSharp.Cdp.Messaging 4 | { 5 | internal class ProfilerTakePreciseCoverageResponse 6 | { 7 | public ScriptCoverage[] Result { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/RequestServedFromCacheResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class RequestServedFromCacheResponse 4 | { 5 | public string RequestId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/RequestWillBeSentResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class RequestWillBeSentResponse 4 | { 5 | public string RequestId { get; set; } 6 | 7 | public string LoaderId { get; set; } 8 | 9 | public Request Request { get; set; } 10 | 11 | public ResponsePayload RedirectResponse { get; set; } 12 | 13 | public ResourceType? Type { get; set; } 14 | 15 | public string FrameId { get; set; } 16 | 17 | public bool RedirectHasExtraInfo { get; set; } 18 | 19 | public string NetworkId { get; set; } 20 | 21 | public Initiator Initiator { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/ResponseReceivedExtraInfoResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Net; 3 | 4 | namespace PuppeteerSharp.Cdp.Messaging 5 | { 6 | internal class ResponseReceivedExtraInfoResponse 7 | { 8 | public string RequestId { get; set; } 9 | 10 | public HttpStatusCode StatusCode { get; set; } 11 | 12 | public Dictionary<string, string> Headers { get; set; } 13 | 14 | public string HeadersText { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/ResponseReceivedResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class ResponseReceivedResponse 4 | { 5 | public string RequestId { get; set; } 6 | 7 | public ResponsePayload Response { get; set; } 8 | 9 | public bool HasExtraInfo { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/RuntimeAddBindingRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class RuntimeAddBindingRequest 4 | { 5 | public string Name { get; set; } 6 | 7 | public string ExecutionContextName { get; set; } 8 | 9 | public int? ExecutionContextId { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/RuntimeCallFunctionOnRequest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PuppeteerSharp.Cdp.Messaging 4 | { 5 | internal class RuntimeCallFunctionOnRequest 6 | { 7 | public string FunctionDeclaration { get; set; } 8 | 9 | public int? ExecutionContextId { get; set; } 10 | 11 | public object[] Arguments { get; set; } 12 | 13 | public bool ReturnByValue { get; set; } 14 | 15 | public bool AwaitPromise { get; set; } 16 | 17 | public bool UserGesture { get; set; } 18 | 19 | public string ObjectId { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/RuntimeCallFunctionOnRequestArgument.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace PuppeteerSharp.Cdp.Messaging 4 | { 5 | internal class RuntimeCallFunctionOnRequestArgument 6 | { 7 | [JsonIgnore(Condition = JsonIgnoreCondition.Never)] 8 | public object Value { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/RuntimeCallFunctionOnResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class RuntimeCallFunctionOnResponse 4 | { 5 | public RemoteObject Result { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/RuntimeEvaluateRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class RuntimeEvaluateRequest 4 | { 5 | public string Expression { get; set; } 6 | 7 | public bool AwaitPromise { get; set; } 8 | 9 | public bool ReturnByValue { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/RuntimeExceptionThrownResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class RuntimeExceptionThrownResponse 4 | { 5 | public EvaluateExceptionResponseDetails ExceptionDetails { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/RuntimeExecutionContextCreatedResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class RuntimeExecutionContextCreatedResponse 4 | { 5 | public ContextPayload Context { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/RuntimeExecutionContextDestroyedResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class RuntimeExecutionContextDestroyedResponse 4 | { 5 | public int ExecutionContextId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/RuntimeGetPropertiesRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class RuntimeGetPropertiesRequest 4 | { 5 | public bool OwnProperties { get; set; } 6 | 7 | public string ObjectId { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/RuntimeGetPropertiesResponse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PuppeteerSharp.Cdp.Messaging 4 | { 5 | internal class RuntimeGetPropertiesResponse 6 | { 7 | public IEnumerable<RuntimeGetPropertiesResponseItem> Result { get; set; } 8 | 9 | public class RuntimeGetPropertiesResponseItem 10 | { 11 | public object Enumerable { get; set; } 12 | 13 | public string Name { get; set; } 14 | 15 | public RemoteObject Value { get; set; } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/RuntimeQueryObjectsRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class RuntimeQueryObjectsRequest 4 | { 5 | public string PrototypeObjectId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/RuntimeQueryObjectsResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class RuntimeQueryObjectsResponse 4 | { 5 | public RemoteObject Objects { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/RuntimeReleaseObjectRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class RuntimeReleaseObjectRequest 4 | { 5 | public string ObjectId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/RuntimeRemoveBindingRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging; 2 | 3 | internal class RuntimeRemoveBindingRequest 4 | { 5 | public string Name { get; set; } 6 | } 7 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/SecurityHandleCertificateErrorResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class SecurityHandleCertificateErrorResponse 4 | { 5 | public int EventId { get; set; } 6 | 7 | public string Action { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/SecuritySetIgnoreCertificateErrorsRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class SecuritySetIgnoreCertificateErrorsRequest 4 | { 5 | public bool Ignore { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/SecuritySetOverrideCertificateErrorsRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class SecuritySetOverrideCertificateErrorsRequest 4 | { 5 | public bool Override { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/StackTrace.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class StackTrace 4 | { 5 | public string Description { get; set; } 6 | 7 | public ConsoleMessageLocation[] CallFrames { get; set; } 8 | 9 | public StackTrace Parent { get; set; } 10 | 11 | public StackTraceId ParentId { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/StackTraceId.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging; 2 | 3 | internal class StackTraceId 4 | { 5 | public string Id { get; set; } 6 | 7 | public string DebuggerId { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/TargetActivateTargetRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class TargetActivateTargetRequest 4 | { 5 | public string TargetId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/TargetAttachToTargetRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class TargetAttachToTargetRequest 4 | { 5 | public string TargetId { get; set; } 6 | 7 | public bool Flatten { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/TargetAttachToTargetResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class TargetAttachToTargetResponse 4 | { 5 | public string SessionId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/TargetAttachedToTargetResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class TargetAttachedToTargetResponse 4 | { 5 | public TargetInfo TargetInfo { get; set; } 6 | 7 | public string SessionId { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/TargetCloseTargetRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class TargetCloseTargetRequest 4 | { 5 | public string TargetId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/TargetCreateBrowserContextRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class TargetCreateBrowserContextRequest 4 | { 5 | public string ProxyServer { get; set; } 6 | 7 | public string ProxyBypassList { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/TargetCreateTargetRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class TargetCreateTargetRequest 4 | { 5 | public string Url { get; set; } 6 | 7 | public object BrowserContextId { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/TargetCreateTargetResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class TargetCreateTargetResponse 4 | { 5 | public string TargetId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/TargetCreatedResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class TargetCreatedResponse 4 | { 5 | public TargetInfo TargetInfo { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/TargetDestroyedResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class TargetDestroyedResponse 4 | { 5 | public string TargetId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/TargetDetachFromTargetRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class TargetDetachFromTargetRequest 4 | { 5 | public string SessionId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/TargetDetachedFromTargetResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class TargetDetachedFromTargetResponse 4 | { 5 | public string SessionId { get; set; } 6 | 7 | public string TargetId { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/TargetDisposeBrowserContextRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class TargetDisposeBrowserContextRequest 4 | { 5 | public string BrowserContextId { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/TargetSendMessageToTargetRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class TargetSendMessageToTargetRequest 4 | { 5 | public string SessionId { get; set; } 6 | 7 | public string Message { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/TargetSetAutoAttachRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class TargetSetAutoAttachRequest 4 | { 5 | public bool AutoAttach { get; set; } 6 | 7 | public bool WaitForDebuggerOnStart { get; set; } 8 | 9 | public bool Flatten { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/TargetSetDiscoverTargetsRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class TargetSetDiscoverTargetsRequest 4 | { 5 | public bool Discover { get; set; } 6 | 7 | public DiscoverFilter[] Filter { get; set; } 8 | 9 | internal class DiscoverFilter 10 | { 11 | public string Type { get; set; } 12 | 13 | public bool? Exclude { get; set; } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/TracingCompleteResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class TracingCompleteResponse 4 | { 5 | public string Stream { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/TracingStartRequest.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class TracingStartRequest 4 | { 5 | public string Categories { get; set; } 6 | 7 | public string TransferMode { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Cdp/Messaging/WSEndpointResponse.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Cdp.Messaging 2 | { 3 | internal class WSEndpointResponse 4 | { 5 | public string WebSocketDebuggerUrl { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/CommandOptions.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp; 2 | 3 | /// <summary> 4 | /// Command options. See <see cref="ICDPConnection.SendAsync{T}(string, object, CommandOptions)"/>. 5 | /// </summary> 6 | public class CommandOptions 7 | { 8 | /// <summary> 9 | /// Gets or sets the timeout. 10 | /// </summary> 11 | /// <value>The timeout.</value> 12 | public int Timeout { get; set; } 13 | } 14 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/ConsoleEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PuppeteerSharp 4 | { 5 | /// <summary> 6 | /// <see cref="IPage.Console"/> data. 7 | /// </summary> 8 | public class ConsoleEventArgs : EventArgs 9 | { 10 | /// <summary> 11 | /// Initializes a new instance of the <see cref="ConsoleEventArgs"/> class. 12 | /// </summary> 13 | /// <param name="message">Message.</param> 14 | public ConsoleEventArgs(ConsoleMessage message) => Message = message; 15 | 16 | /// <summary> 17 | /// Gets the message. 18 | /// </summary> 19 | /// <value>The message.</value> 20 | public ConsoleMessage Message { get; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/ContextPayload.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | internal class ContextPayload 4 | { 5 | public int Id { get; set; } 6 | 7 | public ContextPayloadAuxData AuxData { get; set; } 8 | 9 | public string Name { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/ContextPayloadAuxData.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | internal class ContextPayloadAuxData 4 | { 5 | public string FrameId { get; set; } 6 | 7 | public bool IsDefault { get; set; } 8 | 9 | public DOMWorldType Type { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Credentials.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | /// <summary> 4 | /// Options to be used in <see cref="IPage.AuthenticateAsync(Credentials)"/>. 5 | /// </summary> 6 | public class Credentials 7 | { 8 | /// <summary> 9 | /// Gets or sets the username to be used for authentication. 10 | /// </summary> 11 | public string Username { get; set; } 12 | 13 | /// <summary> 14 | /// Gets or sets the password to be used for authentication. 15 | /// </summary> 16 | public string Password { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/DeviceRequestPromptDevice.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp; 2 | 3 | /// <summary> 4 | /// Device in a request prompt. 5 | /// </summary> 6 | public record DeviceRequestPromptDevice(string Name, string Id); 7 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/DialogEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PuppeteerSharp 4 | { 5 | /// <summary> 6 | /// <see cref="IPage.Dialog"/> arguments. 7 | /// </summary> 8 | public class DialogEventArgs : EventArgs 9 | { 10 | /// <summary> 11 | /// Initializes a new instance of the <see cref="DialogEventArgs"/> class. 12 | /// </summary> 13 | /// <param name="dialog">Dialog.</param> 14 | public DialogEventArgs(Dialog dialog) => Dialog = dialog; 15 | 16 | /// <summary> 17 | /// Dialog data. 18 | /// </summary> 19 | public Dialog Dialog { get; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/DragData.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | /// <summary> 4 | /// Data returned by the drag methods. 5 | /// </summary> 6 | public partial class DragData 7 | { 8 | /// <summary> 9 | /// Drag items. 10 | /// </summary> 11 | public DragDataItem[] Items { get; set; } 12 | 13 | /// <summary> 14 | /// Drag operation. 15 | /// </summary> 16 | public DragOperation DragOperationsMask { get; set; } = DragOperation.Copy; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/ElementScreenshotOptions.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | /// <summary> 4 | /// Options to be used in <see cref="IElementHandle.ScreenshotAsync(string, ElementScreenshotOptions)"/>, <see cref="IElementHandle.ScreenshotStreamAsync(ElementScreenshotOptions)"/> and <see cref="IElementHandle.ScreenshotDataAsync(ElementScreenshotOptions)"/>. 5 | /// </summary> 6 | public class ElementScreenshotOptions : ScreenshotOptions 7 | { 8 | /// <summary> 9 | /// When <c>true</c>, it will scroll into view before taking the screenshot. Defaults to <c>true</c>. 10 | /// </summary> 11 | public bool ScrollIntoView { get; set; } = true; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/EmulateIdleOverrides.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | /// <summary> 4 | /// Options for <see cref="IPage.EmulateIdleStateAsync(EmulateIdleOverrides)"/>. 5 | /// </summary> 6 | public class EmulateIdleOverrides 7 | { 8 | /// <summary> 9 | /// Whether the user is active or not. 10 | /// </summary> 11 | public bool IsUserActive { get; set; } 12 | 13 | /// <summary> 14 | /// Whether the screen is unlocked or not. 15 | /// </summary> 16 | public bool IsScreenUnlocked { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/FramePayload.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | internal class FramePayload 4 | { 5 | public string Id { get; set; } 6 | 7 | public string ParentId { get; set; } 8 | 9 | public string Name { get; set; } 10 | 11 | public string Url { get; set; } 12 | 13 | public string UrlFragment { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/HeadlessMode.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp; 2 | 3 | /// <summary> 4 | /// Headless mode. 5 | /// </summary> 6 | public enum HeadlessMode 7 | { 8 | /// <summary> 9 | /// Launches the browser in the new headless mode <see href="https://developer.chrome.com/articles/new-headless/"/>. 10 | /// </summary> 11 | True, 12 | 13 | /// <summary> 14 | /// Run browser in non-headless mode. 15 | /// </summary> 16 | False, 17 | 18 | /// <summary> 19 | /// Launches the browser in the old headless mode <see href="https://developer.chrome.com/blog/chrome-headless-shell"/>. 20 | /// </summary> 21 | Shell, 22 | } 23 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Helpers/DictionaryExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PuppeteerSharp.Helpers 4 | { 5 | internal static class DictionaryExtensions 6 | { 7 | internal static Dictionary<TKey, TValue> Clone<TKey, TValue>(this Dictionary<TKey, TValue> dic) 8 | => new(dic, dic.Comparer); 9 | 10 | // GetValueOrDefault is available in .NET 8, but we also target .NETStandard 11 | internal static TValue GetValue<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key) 12 | { 13 | dictionary.TryGetValue(key, out var ret); 14 | return ret; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/IBrowserOptions.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | /// <summary> 4 | /// Browser options. 5 | /// </summary> 6 | public interface IBrowserOptions 7 | { 8 | /// <summary> 9 | /// Whether to ignore HTTPS errors during navigation. Defaults to false. 10 | /// </summary> 11 | bool AcceptInsecureCerts { get; } 12 | 13 | /// <summary> 14 | /// Gets or sets the default Viewport. 15 | /// </summary> 16 | /// <value>The default Viewport.</value> 17 | ViewPortOptions DefaultViewport { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/IEnvironment.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | /// <summary> 4 | /// Represents an environment. 5 | /// </summary> 6 | internal interface IEnvironment 7 | { 8 | /// <summary> 9 | /// Gets the CDPSession associated with this environment. 10 | /// </summary> 11 | CDPSession Client { get; } 12 | 13 | /// <summary> 14 | /// Gets the main realm of this environment. 15 | /// </summary> 16 | Realm MainRealm { get; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/InitializationStatus.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | using PuppeteerSharp.Helpers.Json; 3 | 4 | namespace PuppeteerSharp 5 | { 6 | [JsonConverter(typeof(JsonStringEnumMemberConverter<InitializationStatus>))] 7 | internal enum InitializationStatus 8 | { 9 | Aborted, 10 | Success, 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Injected/README.md: -------------------------------------------------------------------------------- 1 | # Injected 2 | 3 | This folder contains the same script that puppetter builds when it releases a new version. 4 | It's not the responsibility of this library to build the injected.js file. 5 | We just need to grab it from upstream. 6 | 7 | TODO: Do this automatically :) 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Input/DownOptions.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Input 2 | { 3 | /// <summary> 4 | /// options to use with <see cref="IKeyboard.DownAsync(string, DownOptions)"/>. 5 | /// </summary> 6 | public class DownOptions 7 | { 8 | /// <summary> 9 | /// If specified, generates an input event with this text. 10 | /// </summary> 11 | public string Text { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Input/KeyDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Input 2 | { 3 | internal class KeyDefinition 4 | { 5 | internal int KeyCode { get; set; } 6 | 7 | internal int? ShiftKeyCode { get; set; } 8 | 9 | internal string Key { get; set; } 10 | 11 | internal string ShiftKey { get; set; } 12 | 13 | internal string Code { get; set; } 14 | 15 | internal string Text { get; set; } 16 | 17 | internal string ShiftText { get; set; } 18 | 19 | internal int Location { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Input/MouseState.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Input 2 | { 3 | internal class MouseState 4 | { 5 | public Point Position { get; set; } 6 | 7 | public MouseButton Buttons { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Input/MouseTransaction.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PuppeteerSharp.Input 4 | { 5 | internal class MouseTransaction 6 | { 7 | public Action<TransactionData> Update { get; set; } 8 | 9 | public Action Commit { get; set; } 10 | 11 | public Action Rollback { get; set; } 12 | 13 | public class TransactionData 14 | { 15 | public Point? Position { get; set; } 16 | 17 | public MouseButton? Buttons { get; set; } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Input/MoveOptions.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Input 2 | { 3 | /// <summary> 4 | /// options to use <see cref="Mouse.MoveAsync(decimal, decimal, MoveOptions)"/>. 5 | /// </summary> 6 | public class MoveOptions 7 | { 8 | /// <summary> 9 | /// Sends intermediate <c>mousemove</c> events. Defaults to 1. 10 | /// </summary> 11 | public int Steps { get; set; } = 1; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Input/PointerType.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using System.Text.Json.Serialization; 3 | using PuppeteerSharp.Helpers.Json; 4 | 5 | namespace PuppeteerSharp.Input 6 | { 7 | [JsonConverter(typeof(JsonStringEnumMemberConverter<PointerType>))] 8 | internal enum PointerType 9 | { 10 | /// <summary> 11 | /// Mouse. 12 | /// </summary> 13 | [EnumMember(Value = "mouse")] 14 | Mouse, 15 | 16 | /// <summary> 17 | /// Pen. 18 | /// </summary> 19 | [EnumMember(Value = "pen")] 20 | Pen, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Input/PressOptions.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Input 2 | { 3 | /// <summary> 4 | /// options to use when pressing a key. 5 | /// </summary> 6 | /// <seealso cref="IKeyboard.PressAsync(string, PressOptions)"/> 7 | /// <seealso cref="IElementHandle.PressAsync(string, PressOptions)"/> 8 | public class PressOptions : DownOptions 9 | { 10 | /// <summary> 11 | /// Time to wait between <c>keydown</c> and <c>keyup</c> in milliseconds. Defaults to 0. 12 | /// </summary> 13 | public int? Delay { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Input/TouchPoint.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Input 2 | { 3 | internal class TouchPoint 4 | { 5 | public decimal X { get; set; } 6 | 7 | public decimal Y { get; set; } 8 | 9 | public decimal RadiusX { get; set; } 10 | 11 | public decimal RadiusY { get; set; } 12 | 13 | public decimal Force { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Input/TypeOptions.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Input 2 | { 3 | /// <summary> 4 | /// Options to use when typing. 5 | /// </summary> 6 | /// <seealso cref="IPage.TypeAsync(string, string, TypeOptions)"/> 7 | /// <seealso cref="IElementHandle.TypeAsync(string, TypeOptions)"/> 8 | /// <seealso cref="IKeyboard.TypeAsync(string, TypeOptions)"/> 9 | public class TypeOptions 10 | { 11 | /// <summary> 12 | /// Time to wait between <c>keydown</c> and <c>keyup</c> in milliseconds. Defaults to 0. 13 | /// </summary> 14 | public int? Delay { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/InternalNetworkConditions.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | internal class InternalNetworkConditions : NetworkConditions 4 | { 5 | public bool Offline { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/InvalidTargetException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PuppeteerSharp 4 | { 5 | [Serializable] 6 | internal class InvalidTargetException : PuppeteerException 7 | { 8 | public InvalidTargetException() 9 | { 10 | } 11 | 12 | public InvalidTargetException(string message) : base(message) 13 | { 14 | } 15 | 16 | public InvalidTargetException(string message, Exception innerException) : base(message, innerException) 17 | { 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/IsExternalInit.cs: -------------------------------------------------------------------------------- 1 | #if !NETSTANDARD2_0 2 | [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.IsExternalInit))] 3 | #else 4 | using System.ComponentModel; 5 | 6 | namespace System.Runtime.CompilerServices 7 | { 8 | [EditorBrowsable(EditorBrowsableState.Never)] 9 | internal static class IsExternalInit 10 | { 11 | } 12 | } 13 | #endif 14 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Media/Clip.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Media 2 | { 3 | /// <summary> 4 | /// Clip data. 5 | /// </summary> 6 | /// <seealso cref="ScreenshotOptions.Clip"/> 7 | public class Clip : BoundingBox 8 | { 9 | /// <summary> 10 | /// Scale of the webpage rendering. Defaults to 1. 11 | /// </summary> 12 | /// <value>The scale.</value> 13 | public int Scale { get; set; } = 1; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Media/ScreenOrientation.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Media 2 | { 3 | internal class ScreenOrientation 4 | { 5 | public int Angle { get; internal set; } 6 | 7 | public string Type { get; internal set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Media/ScreenOrientationType.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.Media 2 | { 3 | internal class ScreenOrientationType 4 | { 5 | internal static string LandscapePrimary => "landscapePrimary"; 6 | 7 | internal static string PortraitPrimary => "portraitPrimary"; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/MessageTask.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json; 2 | using System.Threading.Tasks; 3 | 4 | namespace PuppeteerSharp 5 | { 6 | internal class MessageTask 7 | { 8 | internal byte[] Message { get; set; } 9 | 10 | internal TaskCompletionSource<JsonElement?> TaskWrapper { get; set; } 11 | 12 | internal string Method { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Metric.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | internal struct Metric 4 | { 5 | public string Name { get; set; } 6 | 7 | public decimal Value { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/NewDocumentScriptEvaluation.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp; 2 | 3 | /// <summary> 4 | /// New document information. 5 | /// </summary> 6 | public class NewDocumentScriptEvaluation(string documentIdentifierIdentifier) 7 | { 8 | /// <summary> 9 | /// New document identifier. 10 | /// </summary> 11 | public string Identifier { get; set; } = documentIdentifierIdentifier; 12 | } 13 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/PageBinding.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PuppeteerSharp 4 | { 5 | internal class PageBinding 6 | { 7 | public string Name { get; set; } 8 | 9 | public Delegate Function { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/PageCloseOptions.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | /// <summary> 4 | /// Page close options. 5 | /// </summary> 6 | /// <seealso cref="IPage.CloseAsync(PageCloseOptions)"/> 7 | public class PageCloseOptions 8 | { 9 | /// <summary> 10 | /// Defaults to <c>false</c>. Whether to run the beforeunload page handlers. 11 | /// </summary> 12 | /// <see href="https://developer.mozilla.org/en-US/docs/Web/Events/beforeunload"/> 13 | public bool RunBeforeUnload { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/PageCoverage/CoverageEntryRange.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.PageCoverage 2 | { 3 | /// <summary> 4 | /// Script range. 5 | /// </summary> 6 | public record CoverageEntryRange 7 | { 8 | /// <summary> 9 | /// A start offset in text, inclusive. 10 | /// </summary> 11 | /// <value>Start offset.</value> 12 | public int Start { get; internal set; } 13 | 14 | /// <summary> 15 | /// An end offset in text, exclusive. 16 | /// </summary> 17 | /// <value>End offset.</value> 18 | public int End { get; internal set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/PageCoverage/FunctionCoverage.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.PageCoverage; 2 | 3 | /// <summary> 4 | /// Coverage data for a JavaScript function. 5 | /// </summary> 6 | public record FunctionCoverage 7 | { 8 | /// <summary> 9 | /// JavaScript function name. 10 | /// </summary> 11 | public string FunctionName { get; set; } 12 | 13 | /// <summary> 14 | /// Source ranges inside the function with coverage data. 15 | /// </summary> 16 | public CoverageRange[] Ranges { get; set; } 17 | 18 | /// <summary> 19 | /// Whether coverage data for this function has block granularity. 20 | /// </summary> 21 | public bool IsBlockCoverage { get; set; } 22 | } 23 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/PageCoverage/ScriptCoverage.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.PageCoverage; 2 | 3 | /// <summary> 4 | /// Coverage data for a JavaScript script. 5 | /// </summary> 6 | public record ScriptCoverage 7 | { 8 | /// <summary> 9 | /// JavaScript script id. 10 | /// </summary> 11 | public string ScriptId { get; set; } 12 | 13 | /// <summary> 14 | /// JavaScript script name or url. 15 | /// </summary> 16 | public string Url { get; set; } 17 | 18 | /// <summary> 19 | /// Functions contained in the script that has coverage data. 20 | /// </summary> 21 | public FunctionCoverage[] Functions { get; set; } 22 | } 23 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/PageErrorEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PuppeteerSharp 4 | { 5 | /// <summary> 6 | /// Page error event arguments. 7 | /// </summary> 8 | public class PageErrorEventArgs : EventArgs 9 | { 10 | /// <summary> 11 | /// Initializes a new instance of the <see cref="PageErrorEventArgs"/> class. 12 | /// </summary> 13 | /// <param name="message">Message.</param> 14 | public PageErrorEventArgs(string message) => Message = message; 15 | 16 | /// <summary> 17 | /// Error Message. 18 | /// </summary> 19 | /// <value>The message.</value> 20 | public string Message { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Point.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | /// <summary> 4 | /// Represents a Point. 5 | /// </summary> 6 | public struct Point 7 | { 8 | /// <summary> 9 | /// Gets the X point. 10 | /// </summary> 11 | public decimal X { get; set; } 12 | 13 | /// <summary> 14 | /// Gets the y point. 15 | /// </summary> 16 | public decimal Y { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/PopupEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PuppeteerSharp 4 | { 5 | /// <summary> 6 | /// Popup event arguments. <see cref="IPage.Popup"/>. 7 | /// </summary> 8 | public class PopupEventArgs : EventArgs 9 | { 10 | /// <summary> 11 | /// Gets the popup page. 12 | /// </summary> 13 | public IPage PopupPage { get; internal set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/QueryHandlers/CssQueryHandler.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.QueryHandlers 2 | { 3 | internal class CssQueryHandler : QueryHandler 4 | { 5 | internal CssQueryHandler() 6 | { 7 | QuerySelector = @"(element, selector) => { 8 | return element.querySelector(selector); 9 | }"; 10 | 11 | QuerySelectorAll = @"(element, selector) => { 12 | return element.querySelectorAll(selector); 13 | }"; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/QueryHandlers/PierceQueryHandler.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.QueryHandlers 2 | { 3 | internal class PierceQueryHandler : QueryHandler 4 | { 5 | internal PierceQueryHandler() 6 | { 7 | QuerySelector = @"(element, selector, {pierceQuerySelector}) => { 8 | return pierceQuerySelector(element, selector); 9 | }"; 10 | 11 | QuerySelectorAll = @"(element, selector, {pierceQuerySelectorAll}) => { 12 | return pierceQuerySelectorAll(element, selector); 13 | }"; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/QueryHandlers/TextQueryHandler.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.QueryHandlers 2 | { 3 | internal class TextQueryHandler : QueryHandler 4 | { 5 | internal TextQueryHandler() 6 | { 7 | QuerySelectorAll = @"(element, selector, {textQuerySelectorAll}) => { 8 | return textQuerySelectorAll(element, selector); 9 | }"; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/QueryHandlers/XPathQueryHandler.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp.QueryHandlers 2 | { 3 | internal class XPathQueryHandler : QueryHandler 4 | { 5 | internal XPathQueryHandler() 6 | { 7 | QuerySelectorAll = @"(element, selector, {xpathQuerySelectorAll}) => { 8 | return xpathQuerySelectorAll(element, selector); 9 | }"; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/QueuedEventGroup.cs: -------------------------------------------------------------------------------- 1 | using PuppeteerSharp.Cdp.Messaging; 2 | 3 | namespace PuppeteerSharp 4 | { 5 | internal class QueuedEventGroup 6 | { 7 | public ResponseReceivedResponse ResponseReceivedEvent { get; set; } 8 | 9 | public LoadingFinishedEventResponse LoadingFinishedEvent { get; set; } 10 | 11 | public LoadingFailedEventResponse LoadingFailedEvent { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/RedirectInfo.cs: -------------------------------------------------------------------------------- 1 | using PuppeteerSharp.Cdp.Messaging; 2 | 3 | namespace PuppeteerSharp 4 | { 5 | internal class RedirectInfo 6 | { 7 | public RequestWillBeSentResponse Event { get; set; } 8 | 9 | public string FetchRequestId { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/RemoteAddress.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | /// <summary> 4 | /// Remote server address. 5 | /// </summary> 6 | /// <seealso cref="IResponse.RemoteAddress"/> 7 | public class RemoteAddress 8 | { 9 | /// <summary> 10 | /// The IP address of the remote server. 11 | /// </summary> 12 | public string IP { get; set; } 13 | 14 | /// <summary> 15 | /// The port used to connect to the remote server. 16 | /// </summary> 17 | public int Port { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/RequestEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PuppeteerSharp 4 | { 5 | /// <summary> 6 | /// Arguments used by <see cref="IPage"/> events. 7 | /// </summary> 8 | /// <seealso cref="IPage.Request"/> 9 | /// <seealso cref="IPage.RequestFailed"/> 10 | /// <seealso cref="IPage.RequestFinished"/> 11 | public class RequestEventArgs(IRequest request) : EventArgs 12 | { 13 | /// <summary> 14 | /// Gets the request. 15 | /// </summary> 16 | /// <value>The request.</value> 17 | public IRequest Request { get; } = request; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/ResponseCreatedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PuppeteerSharp 4 | { 5 | /// <summary> 6 | /// <see cref="IPage.Response"/> arguments. 7 | /// </summary> 8 | public class ResponseCreatedEventArgs(IResponse response) : EventArgs 9 | { 10 | /// <summary> 11 | /// Gets the response. 12 | /// </summary> 13 | /// <value>The response.</value> 14 | public IResponse Response { get; } = response; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/SessionEventArgs.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | /// <summary> 4 | /// Session event arguments. 5 | /// </summary> 6 | public class SessionEventArgs 7 | { 8 | internal SessionEventArgs(ICDPSession session) 9 | { 10 | Session = session; 11 | } 12 | 13 | /// <summary> 14 | /// Gets or sets the session. 15 | /// </summary> 16 | public ICDPSession Session { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/SupportedBrowser.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | /// <summary> 4 | /// Supported Browser. 5 | /// </summary> 6 | public enum SupportedBrowser 7 | { 8 | /// <summary> 9 | /// Chrome. 10 | /// </summary> 11 | Chrome, 12 | 13 | /// <summary> 14 | /// Firefox. 15 | /// </summary> 16 | Firefox, 17 | 18 | /// <summary> 19 | /// Chromium. 20 | /// </summary> 21 | Chromium, 22 | 23 | /// <summary> 24 | /// Chrome headless shell. 25 | /// </summary> 26 | ChromeHeadlessShell, 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/TargetCrashedException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PuppeteerSharp 4 | { 5 | [Serializable] 6 | internal class TargetCrashedException : PuppeteerException 7 | { 8 | public TargetCrashedException() 9 | { 10 | } 11 | 12 | public TargetCrashedException(string message) : base(message) 13 | { 14 | } 15 | 16 | public TargetCrashedException(string message, Exception innerException) : base(message, innerException) 17 | { 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/TimeoutSettings.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | /// <summary> 4 | /// Timeout settings. 5 | /// </summary> 6 | public class TimeoutSettings 7 | { 8 | private int? _defaultNavigationTimeout; 9 | 10 | /// <summary> 11 | /// Navigation Timeout. 12 | /// </summary> 13 | public int NavigationTimeout 14 | { 15 | get => _defaultNavigationTimeout ?? Timeout; 16 | set => _defaultNavigationTimeout = value; 17 | } 18 | 19 | /// <summary> 20 | /// Default timeout. 21 | /// </summary> 22 | public int Timeout { get; set; } = Puppeteer.DefaultTimeout; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/Transport/TransportTaskScheduler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading; 3 | using System.Threading.Tasks; 4 | 5 | namespace PuppeteerSharp.Transport 6 | { 7 | /// <summary> 8 | /// Delegate for scheduling of long-running transport tasks. 9 | /// </summary> 10 | /// <param name="taskFactory">Delegate that creates the task to be scheduled.</param> 11 | /// <param name="cancellationToken">Cancellation token for the task to be scheduled.</param> 12 | public delegate void TransportTaskScheduler(Func<CancellationToken, Task> taskFactory, CancellationToken cancellationToken); 13 | } 14 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/UserAgentBrandVersion.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | /// <summary> 4 | /// Used to specify User Agent Cient Hints to emulate. See https://wicg.github.io/ua-client-hints. 5 | /// </summary> 6 | public class UserAgentBrandVersion 7 | { 8 | /// <summary> 9 | /// Brand. 10 | /// </summary> 11 | public string Brand { get; set; } 12 | 13 | /// <summary> 14 | /// Version. 15 | /// </summary> 16 | public string Version { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/WaitForNetworkIdleOptions.cs: -------------------------------------------------------------------------------- 1 | namespace PuppeteerSharp 2 | { 3 | /// <summary> 4 | /// Optional waiting parameters. 5 | /// </summary> 6 | /// <seealso cref="IPage.WaitForNetworkIdleAsync"/> 7 | public class WaitForNetworkIdleOptions : WaitForOptions 8 | { 9 | /// <summary> 10 | /// How long to wait for no network requests in milliseconds, defaults to 500 milliseconds. 11 | /// </summary> 12 | public int? IdleTime { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/PuppeteerSharp/WorkerEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PuppeteerSharp 4 | { 5 | /// <summary> 6 | /// Workder created event arguments. 7 | /// </summary> 8 | public class WorkerEventArgs : EventArgs 9 | { 10 | /// <summary> 11 | /// Initializes a new instance of the <see cref="WorkerEventArgs"/> class. 12 | /// </summary> 13 | /// <param name="worker">Worker.</param> 14 | public WorkerEventArgs(WebWorker worker) => Worker = worker; 15 | 16 | /// <summary> 17 | /// Worker. 18 | /// </summary> 19 | /// <value>The worker.</value> 20 | public WebWorker Worker { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/keys/keypair.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/lib/keys/keypair.snk -------------------------------------------------------------------------------- /lib/stylecop.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", 3 | "settings": { 4 | "documentationRules": { 5 | "documentInternalElements": false 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /mdsnippets.json: -------------------------------------------------------------------------------- 1 | { 2 | "Convention": "InPlaceOverwrite", 3 | "UrlPrefix": "https://github.com/hardkoded/puppeteer-sharp/blob/master" 4 | } 5 | -------------------------------------------------------------------------------- /samples/PupppeterSharpAspNetFrameworkSample/PupppeterSharpAspNetFrameworkSample/Controllers/FooController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Net.Http; 6 | using System.Web.Http; 7 | 8 | namespace PupppeterSharpAspNetFrameworkSample.Controllers 9 | { 10 | public class FooController : ApiController 11 | { 12 | public string Get() => "bar"; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /samples/PupppeterSharpAspNetFrameworkSample/PupppeterSharpAspNetFrameworkSample/Controllers/TestController.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using System.Web.Http; 3 | using PupppeterSharpAspNetFrameworkSample.Services; 4 | 5 | namespace PupppeterSharpAspNetFrameworkSample.Controllers 6 | { 7 | public class TestController : ApiController 8 | { 9 | public Task<string> Get() => BrowserClient.GetTextAsync("http://localhost/PupppeterSharpAspNetFrameworkSample/api/foo"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /samples/PupppeterSharpAspNetFrameworkSample/PupppeterSharpAspNetFrameworkSample/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="PupppeterSharpAspNetFrameworkSample.WebApiApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /samples/PupppeterSharpAspNetFrameworkSample/PupppeterSharpAspNetFrameworkSample/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Hosting; 6 | using System.Web.Http; 7 | using System.Web.Mvc; 8 | using System.Web.Optimization; 9 | using System.Web.Routing; 10 | 11 | namespace PupppeterSharpAspNetFrameworkSample 12 | { 13 | public class WebApiApplication : System.Web.HttpApplication 14 | { 15 | protected void Application_Start() 16 | { 17 | AreaRegistration.RegisterAllAreas(); 18 | GlobalConfiguration.Configure(WebApiConfig.Register); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /samples/PupppeterSharpAspNetFrameworkSample/PupppeterSharpAspNetFrameworkSample/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardkoded/puppeteer-sharp/459b57d9876f2e2a8282a0cb36e028f8fdaa1388/samples/PupppeterSharpAspNetFrameworkSample/PupppeterSharpAspNetFrameworkSample/favicon.ico -------------------------------------------------------------------------------- /samples/README.md: -------------------------------------------------------------------------------- 1 | # Puppeteer Sharp Samples 2 | 3 | This folder contains all the samples for Puppeteer Sharp. 4 | 5 | ## Building a samples 6 | 7 | All the examples were created and created using the .NET Core CLI and require C# 7.1. 8 | 9 | You can build any sample using .NET Core CLI, which can be installed using the [.NET Core SDK](https://www.microsoft.com/net/download). 10 | Then execute these commands from the CLI in the directory of any sample. 11 | 12 | ``` 13 | dotnet build 14 | dotnet run 15 | ``` 16 | -------------------------------------------------------------------------------- /samples/complex-js-objects/complex-js-objects.csproj: -------------------------------------------------------------------------------- 1 | <Project Sdk="Microsoft.NET.Sdk"> 2 | 3 | <PropertyGroup> 4 | <OutputType>Exe</OutputType> 5 | <TargetFramework>net8.0</TargetFramework> 6 | <RootNamespace>complex_js_objects</RootNamespace> 7 | </PropertyGroup> 8 | 9 | <ItemGroup> 10 | <PackageReference Include="PuppeteerSharp" Version="9.0.2" /> 11 | </ItemGroup> 12 | 13 | </Project> 14 | -------------------------------------------------------------------------------- /samples/get-all-links/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "build", 6 | "command": "dotnet", 7 | "type": "process", 8 | "args": [ 9 | "build", 10 | "${workspaceFolder}/get-all-links.csproj" 11 | ], 12 | "problemMatcher": "$msCompile" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /samples/get-all-links/README.md: -------------------------------------------------------------------------------- 1 | # Get All Href Links From A Page 2 | 3 | This sample demonstrates how to get the links from a page. 4 | -------------------------------------------------------------------------------- /samples/get-all-links/get-all-links.csproj: -------------------------------------------------------------------------------- 1 | <Project Sdk="Microsoft.NET.Sdk"> 2 | 3 | <PropertyGroup> 4 | <OutputType>Exe</OutputType> 5 | <TargetFramework>net8.0</TargetFramework> 6 | <RootNamespace>Example</RootNamespace> 7 | </PropertyGroup> 8 | 9 | <ItemGroup> 10 | <PackageReference Include="puppeteersharp" Version="9.0.2" /> 11 | </ItemGroup> 12 | 13 | </Project> 14 | -------------------------------------------------------------------------------- /samples/reuse-downloaded-chrome/README.md: -------------------------------------------------------------------------------- 1 | # Reusing a version of Chrome downloaded in a non-default location 2 | 3 | This example demonstrates how to download Chrome to a custom location and then 4 | proceeds to use Chrome from the custom location. 5 | -------------------------------------------------------------------------------- /samples/reuse-downloaded-chrome/reuse-downloaded-chrome.csproj: -------------------------------------------------------------------------------- 1 | <Project Sdk="Microsoft.NET.Sdk"> 2 | 3 | <PropertyGroup> 4 | <OutputType>Exe</OutputType> 5 | <TargetFramework>net8.0</TargetFramework> 6 | <RootNamespace>Exaxmple</RootNamespace> 7 | </PropertyGroup> 8 | 9 | <ItemGroup> 10 | <PackageReference Include="PuppeteerSharp" Version="9.0.2" /> 11 | </ItemGroup> 12 | 13 | </Project> 14 | -------------------------------------------------------------------------------- /samples/searching/README.md: -------------------------------------------------------------------------------- 1 | # Scraping search results from a website 2 | 3 | This example searches developers.google.com/web for articles tagged 4 | "Headless Chrome" and scrape results from the results page. 5 | -------------------------------------------------------------------------------- /samples/searching/searching.csproj: -------------------------------------------------------------------------------- 1 | <Project Sdk="Microsoft.NET.Sdk"> 2 | 3 | <PropertyGroup> 4 | <OutputType>Exe</OutputType> 5 | <TargetFramework>net8.0</TargetFramework> 6 | </PropertyGroup> 7 | 8 | <ItemGroup> 9 | <PackageReference Include="puppeteersharp" Version="9.0.2" /> 10 | </ItemGroup> 11 | 12 | </Project> 13 | -------------------------------------------------------------------------------- /tools/github-ops/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "github-ops", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "Dario Kondratiuk", 10 | "license": "MIT", 11 | "dependencies": { 12 | "axios": "1.6.7", 13 | "dotenv": "16.4.1" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tools/upstream-ops/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "upstream-ops", 3 | "version": "1.0.0", 4 | "description": "Scripts to work on puppeteer code", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "Dario Kondratiuk", 10 | "license": "ISC" 11 | } 12 | --------------------------------------------------------------------------------