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