Class: Stagehand::Models::SessionObserveResponse::Data::Result

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

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(description:, selector:, arguments: nil, backend_node_id: nil, method_: nil) ⇒ Object

Action object returned by observe and used by act

Parameters:

  • description (String)

    Human-readable description of the action

  • selector (String)

    CSS selector or XPath for the element

  • arguments (Array<String>) (defaults to: nil)

    Arguments to pass to the method

  • backend_node_id (Float) (defaults to: nil)

    Backend node ID for the element

  • method_ (String) (defaults to: nil)

    The method to execute (click, fill, etc.)



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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
# File 'lib/stagehand/models/session_observe_response.rb', line 44

class Result < Stagehand::Internal::Type::BaseModel
  # @!attribute description
  #   Human-readable description of the action
  #
  #   @return [String]
  required :description, String

  # @!attribute selector
  #   CSS selector or XPath for the element
  #
  #   @return [String]
  required :selector, String

  # @!attribute arguments
  #   Arguments to pass to the method
  #
  #   @return [Array<String>, nil]
  optional :arguments, Stagehand::Internal::Type::ArrayOf[String]

  # @!attribute backend_node_id
  #   Backend node ID for the element
  #
  #   @return [Float, nil]
  optional :backend_node_id, Float, api_name: :backendNodeId

  # @!attribute method_
  #   The method to execute (click, fill, etc.)
  #
  #   @return [String, nil]
  optional :method_, String, api_name: :method

  # @!method initialize(description:, selector:, arguments: nil, backend_node_id: nil, method_: nil)
  #   Action object returned by observe and used by act
  #
  #   @param description [String] Human-readable description of the action
  #
  #   @param selector [String] CSS selector or XPath for the element
  #
  #   @param arguments [Array<String>] Arguments to pass to the method
  #
  #   @param backend_node_id [Float] Backend node ID for the element
  #
  #   @param method_ [String] The method to execute (click, fill, etc.)
end

Instance Attribute Details

#argumentsArray<String>?

Arguments to pass to the method

Returns:

  • (Array<String>, nil)


61
# File 'lib/stagehand/models/session_observe_response.rb', line 61

optional :arguments, Stagehand::Internal::Type::ArrayOf[String]

#backend_node_idFloat?

Backend node ID for the element

Returns:

  • (Float, nil)


67
# File 'lib/stagehand/models/session_observe_response.rb', line 67

optional :backend_node_id, Float, api_name: :backendNodeId

#descriptionString

Human-readable description of the action

Returns:

  • (String)


49
# File 'lib/stagehand/models/session_observe_response.rb', line 49

required :description, String

#method_String?

The method to execute (click, fill, etc.)

Returns:

  • (String, nil)


73
# File 'lib/stagehand/models/session_observe_response.rb', line 73

optional :method_, String, api_name: :method

#selectorString

CSS selector or XPath for the element

Returns:

  • (String)


55
# File 'lib/stagehand/models/session_observe_response.rb', line 55

required :selector, String