class Async::Webdriver::Execute

Public Class Methods

new(connection:) click to toggle source
# File lib/async/webdriver/execute.rb, line 4
def initialize(connection:)
  @execute_connection = ConnectionPath.new "execute", connection: connection
end

Public Instance Methods

async(script, args=[]) click to toggle source
# File lib/async/webdriver/execute.rb, line 18
def async(script, args=[])
  #TODO: args?
  body = {
    script: script,
    args: args
  }

  @execute_connection.call method: "post", path: "async", body: body
end
sync(script, args=[]) click to toggle source
# File lib/async/webdriver/execute.rb, line 8
def sync(script, args=[])
  #TODO: args?
  body = {
    script: script,
    args: args
  }

  @execute_connection.call method: "post", path: "sync", body: body
end