Uses of Class
com.microsoft.playwright.Browser.NewPageOptions
Packages that use Browser.NewPageOptions
-
Uses of Browser.NewPageOptions in com.microsoft.playwright
Methods in com.microsoft.playwright that return Browser.NewPageOptionsModifier and TypeMethodDescriptionBrowser.NewPageOptions.setAcceptDownloads(boolean acceptDownloads) Whether to automatically download all the attachments.Browser.NewPageOptions.setBaseURL(String baseURL) When usingPage.navigate(),Page.route(),Page.waitForURL(),Page.waitForRequest(), orPage.waitForResponse()it takes the base URL in consideration by using theURL()constructor for building the corresponding URL.Browser.NewPageOptions.setBypassCSP(boolean bypassCSP) Toggles bypassing page's Content-Security-Policy.Browser.NewPageOptions.setColorScheme(ColorScheme colorScheme) Emulates"prefers-colors-scheme"media feature, supported values are"light","dark","no-preference".Browser.NewPageOptions.setDeviceScaleFactor(double deviceScaleFactor) Specify device scale factor (can be thought of as dpr).Browser.NewPageOptions.setExtraHTTPHeaders(Map<String, String> extraHTTPHeaders) An object containing additional HTTP headers to be sent with every request.Browser.NewPageOptions.setForcedColors(ForcedColors forcedColors) Emulates"forced-colors"media feature, supported values are"active","none".Browser.NewPageOptions.setGeolocation(double latitude, double longitude) Browser.NewPageOptions.setGeolocation(Geolocation geolocation) Browser.NewPageOptions.setHasTouch(boolean hasTouch) Specifies if viewport supports touch events.Browser.NewPageOptions.setHttpCredentials(HttpCredentials httpCredentials) Credentials for HTTP authentication.Browser.NewPageOptions.setHttpCredentials(String username, String password) Credentials for HTTP authentication.Browser.NewPageOptions.setIgnoreHTTPSErrors(boolean ignoreHTTPSErrors) Whether to ignore HTTPS errors when sending network requests.Browser.NewPageOptions.setIsMobile(boolean isMobile) Whether themeta viewporttag is taken into account and touch events are enabled.Browser.NewPageOptions.setJavaScriptEnabled(boolean javaScriptEnabled) Whether or not to enable JavaScript in the context.Specify user locale, for exampleen-GB,de-DE, etc.Browser.NewPageOptions.setOffline(boolean offline) Whether to emulate network being offline.Browser.NewPageOptions.setPermissions(List<String> permissions) A list of permissions to grant to all pages in this context.Network proxy settings to use with this context.Network proxy settings to use with this context.Browser.NewPageOptions.setRecordHarContent(HarContentPolicy recordHarContent) Optional setting to control resource content management.Browser.NewPageOptions.setRecordHarMode(HarMode recordHarMode) When set tominimal, only record information necessary for routing from HAR.Browser.NewPageOptions.setRecordHarOmitContent(boolean recordHarOmitContent) Optional setting to control whether to omit request content from the HAR.Browser.NewPageOptions.setRecordHarPath(Path recordHarPath) Enables HAR recording for all pages into the specified HAR file on the filesystem.Browser.NewPageOptions.setRecordHarUrlFilter(String recordHarUrlFilter) Browser.NewPageOptions.setRecordHarUrlFilter(Pattern recordHarUrlFilter) Browser.NewPageOptions.setRecordVideoDir(Path recordVideoDir) Enables video recording for all pages into the specified directory.Browser.NewPageOptions.setRecordVideoSize(int width, int height) Dimensions of the recorded videos.Browser.NewPageOptions.setRecordVideoSize(RecordVideoSize recordVideoSize) Dimensions of the recorded videos.Browser.NewPageOptions.setReducedMotion(ReducedMotion reducedMotion) Emulates"prefers-reduced-motion"media feature, supported values are"reduce","no-preference".Browser.NewPageOptions.setScreenSize(int width, int height) Emulates consistent window screen size available inside web page viawindow.screen.Browser.NewPageOptions.setScreenSize(ScreenSize screenSize) Emulates consistent window screen size available inside web page viawindow.screen.Browser.NewPageOptions.setServiceWorkers(ServiceWorkerPolicy serviceWorkers) Whether to allow sites to register Service workers.Browser.NewPageOptions.setStorageState(String storageState) Populates context with given storage state.Browser.NewPageOptions.setStorageStatePath(Path storageStatePath) Populates context with given storage state.Browser.NewPageOptions.setStrictSelectors(boolean strictSelectors) If set to true, enables strict selectors mode for this context.Browser.NewPageOptions.setTimezoneId(String timezoneId) Changes the timezone of the context.Browser.NewPageOptions.setUserAgent(String userAgent) Specific user agent to use in this context.Browser.NewPageOptions.setViewportSize(int width, int height) Emulates consistent viewport for each page.Browser.NewPageOptions.setViewportSize(ViewportSize viewportSize) Emulates consistent viewport for each page.Methods in com.microsoft.playwright with parameters of type Browser.NewPageOptionsModifier and TypeMethodDescriptionBrowser.newPage(Browser.NewPageOptions options) Creates a new page in a new browser context. -
Uses of Browser.NewPageOptions in com.microsoft.playwright.impl
Methods in com.microsoft.playwright.impl with parameters of type Browser.NewPageOptionsModifier and TypeMethodDescriptionBrowserImpl.newPage(Browser.NewPageOptions options) private PageBrowserImpl.newPageImpl(Browser.NewPageOptions options)