Sha256: efb0422c1d9abcb5d3133096dd8b9a0eecf83392ff5742f57ccc3539ac13a0d3

Contents?: true

Size: 1.19 KB

Versions: 2

Compression:

Stored size: 1.19 KB

Contents

# frozen_string_literal: true

module PuppeteerEntity
  module Attributes
    class Query < Dry::Struct
      transform_keys(&:to_sym)

      # Whether or nor to load ad-blocking extensions for the session. This currently uses uBlock Origin and may cause certain sites to not load properly.
      attribute? :block_ads, Types::Bool.optional
      # Launch options, which can be either an object of puppeteer.launch options or playwright.launchServer options, depending on the API.
      attribute? :launch do
        attribute? :args, Types::Array.of(Types::String).optional
        attribute? :default_viewport do
          attributes_from Attributes::Viewport
        end
      end
      # Whether or nor to record the session. The browser will run in "head-full" mode, and recording is started and closed via the embedded browserless API. Please refer to the "Recording" section in the live documentation site for more details.
      attribute? :record, Types::Bool.optional
      # Override the system-level timeout for this request. Accepts a value in milliseconds.
      attribute? :timeout, Types::Integer.optional
      # The authorization token
      attribute? :token, Types::String.optional
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
puppeteer_entity-0.1.1 lib/puppeteer_entity/attributes/query.rb
puppeteer_entity-0.1.0 lib/puppeteer_entity/attributes/query.rb