class Async::Webdriver::Element

Public Class Methods

new(json:, connection:) click to toggle source
# File lib/async/webdriver/element.rb, line 5
def initialize(json:, connection:)
  @id = json.fetch "ELEMENT"
  @element_connection = ConnectionPath.new "element/#{@id}", connection: connection
end

Public Instance Methods

tag_name() click to toggle source
# File lib/async/webdriver/element.rb, line 10
def tag_name
  @element_connection.call method: "get", path: "name"
  value
end
text() click to toggle source
# File lib/async/webdriver/element.rb, line 15
def text
  @element_connection.call method: "get", path: "text"
end