Class: Google::Apis::TestingV1::RoboDirective

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/testing_v1/classes.rb,
lib/google/apis/testing_v1/representations.rb,
lib/google/apis/testing_v1/representations.rb

Overview

Directs Robo to interact with a specific UI element if it is encountered during the crawl. Currently, Robo can perform text entry or element click.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RoboDirective

Returns a new instance of RoboDirective.



2025
2026
2027
# File 'lib/google/apis/testing_v1/classes.rb', line 2025

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#action_typeString

Required. The type of action that Robo should perform on the specified element. Corresponds to the JSON property actionType

Returns:

  • (String)


2009
2010
2011
# File 'lib/google/apis/testing_v1/classes.rb', line 2009

def action_type
  @action_type
end

#input_textString

The text that Robo is directed to set. If left empty, the directive will be treated as a CLICK on the element matching the resource_name. Corresponds to the JSON property inputText

Returns:

  • (String)


2015
2016
2017
# File 'lib/google/apis/testing_v1/classes.rb', line 2015

def input_text
  @input_text
end

#resource_nameString

Required. The android resource name of the target UI element. For example, in Java: R.string.foo in xml: @string/foo Only the "foo" part is needed. Reference doc: https://developer.android.com/guide/topics/resources/accessing- resources.html Corresponds to the JSON property resourceName

Returns:

  • (String)


2023
2024
2025
# File 'lib/google/apis/testing_v1/classes.rb', line 2023

def resource_name
  @resource_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2030
2031
2032
2033
2034
# File 'lib/google/apis/testing_v1/classes.rb', line 2030

def update!(**args)
  @action_type = args[:action_type] if args.key?(:action_type)
  @input_text = args[:input_text] if args.key?(:input_text)
  @resource_name = args[:resource_name] if args.key?(:resource_name)
end