Class: UIAutomation::RemoteProxy::RemoteObjectByElementID Private

Inherits:
RemoteJavascriptObject show all
Defined in:
lib/ui_automation.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Represents a remote javascript object by element ID, where element ID is the ID of a Selenium::WebDriver::Element returned by one of the built-in Selenium finder methods.

This allows us to construct remote proxies to javascript objects that are found using e.g. an xpath without having to know the actual index path to the object in the UIAutomation javascript object tree.

Instance Method Summary collapse

Methods inherited from RemoteJavascriptObject

#format_arg, #format_args, #object_for_function, #object_for_property, #object_for_subscript, #to_s

Constructor Details

#initialize(object_id) ⇒ RemoteObjectByElementID

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of RemoteObjectByElementID.


237
238
239
# File 'lib/ui_automation.rb', line 237

def initialize(object_id)
  @object_id = object_id
end

Instance Method Details

#javascriptvoid

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


241
242
243
244
# File 'lib/ui_automation.rb', line 241

def javascript
  # this uses internal APIs provided by appium-auto
  "au.getElement(#{@object_id})"
end