Class: Capybara::Playwright::PageOptions
- Inherits:
-
Object
- Object
- Capybara::Playwright::PageOptions
- Defined in:
- lib/capybara/playwright/page_options.rb
Constant Summary collapse
- NEW_PAGE_PARAMS =
{ acceptDownloads: nil, bypassCSP: nil, colorScheme: nil, deviceScaleFactor: nil, extraHTTPHeaders: nil, geolocation: nil, hasTouch: nil, httpCredentials: nil, ignoreHTTPSErrors: nil, isMobile: nil, javaScriptEnabled: nil, locale: nil, noViewport: nil, offline: nil, permissions: nil, proxy: nil, record_har_omit_content: nil, record_har_path: nil, record_video_dir: nil, record_video_size: nil, screen: nil, serviceWorkers: nil, storageState: nil, timezoneId: nil, userAgent: nil, viewport: nil, }.keys
Instance Method Summary collapse
-
#initialize(options) ⇒ PageOptions
constructor
A new instance of PageOptions.
- #value ⇒ Object
Constructor Details
#initialize(options) ⇒ PageOptions
Returns a new instance of PageOptions.
4 5 6 |
# File 'lib/capybara/playwright/page_options.rb', line 4 def initialize() @options = end |
Instance Method Details
#value ⇒ Object
37 38 39 40 41 42 |
# File 'lib/capybara/playwright/page_options.rb', line 37 def value @options.select { |k, _| NEW_PAGE_PARAMS.include?(k) }.tap do || # Set default value [:acceptDownloads] = true end end |