Class: Selenium::WebDriver::Remote::Bridge::WrappedParent

Inherits:
Object
  • Object
show all
Defined in:
lib/angular_webdriver/protractor/webdriver_patch.rb

Overview

execute_script requires a JSON representation of the element id otherwise the element will not be sent correctly to the browser

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ WrappedParent

Returns a new instance of WrappedParent.


80
81
82
# File 'lib/angular_webdriver/protractor/webdriver_patch.rb', line 80

def initialize id
  @id = id
end

Instance Method Details

#to_json(*args) ⇒ Object


84
85
86
# File 'lib/angular_webdriver/protractor/webdriver_patch.rb', line 84

def to_json *args
  { ELEMENT: @id }.to_json
end