Class: Stagehand::Models::SessionNavigateParams::Options

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/stagehand/models/session_navigate_params.rb

Defined Under Namespace

Modules: WaitUntil

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(referer: nil, timeout: nil, wait_until: nil) ⇒ Object

Parameters:



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/stagehand/models/session_navigate_params.rb', line 60

class Options < Stagehand::Internal::Type::BaseModel
  # @!attribute referer
  #   Referer header to send with the request
  #
  #   @return [String, nil]
  optional :referer, String

  # @!attribute timeout
  #   Timeout in ms for the navigation
  #
  #   @return [Float, nil]
  optional :timeout, Float

  # @!attribute wait_until
  #   When to consider navigation complete
  #
  #   @return [Symbol, Stagehand::Models::SessionNavigateParams::Options::WaitUntil, nil]
  optional :wait_until,
           enum: -> { Stagehand::SessionNavigateParams::Options::WaitUntil },
           api_name: :waitUntil

  # @!method initialize(referer: nil, timeout: nil, wait_until: nil)
  #   @param referer [String] Referer header to send with the request
  #
  #   @param timeout [Float] Timeout in ms for the navigation
  #
  #   @param wait_until [Symbol, Stagehand::Models::SessionNavigateParams::Options::WaitUntil] When to consider navigation complete

  # When to consider navigation complete
  #
  # @see Stagehand::Models::SessionNavigateParams::Options#wait_until
  module WaitUntil
    extend Stagehand::Internal::Type::Enum

    LOAD = :load
    DOMCONTENTLOADED = :domcontentloaded
    NETWORKIDLE = :networkidle

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#refererString?

Referer header to send with the request

Returns:

  • (String, nil)


65
# File 'lib/stagehand/models/session_navigate_params.rb', line 65

optional :referer, String

#timeoutFloat?

Timeout in ms for the navigation

Returns:

  • (Float, nil)


71
# File 'lib/stagehand/models/session_navigate_params.rb', line 71

optional :timeout, Float

#wait_untilSymbol, ...

When to consider navigation complete



77
78
79
# File 'lib/stagehand/models/session_navigate_params.rb', line 77

optional :wait_until,
enum: -> { Stagehand::SessionNavigateParams::Options::WaitUntil },
api_name: :waitUntil