Class: Browserctl::PageProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/browserctl/workflow.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, client) ⇒ PageProxy

Returns a new instance of PageProxy.



68
69
70
71
# File 'lib/browserctl/workflow.rb', line 68

def initialize(name, client)
  @name   = name
  @client = client
end

Instance Method Details

#click(sel) ⇒ Object



75
# File 'lib/browserctl/workflow.rb', line 75

def click(sel)       = unwrap @client.click(@name, sel)

#evaluate(expr) ⇒ Object



80
# File 'lib/browserctl/workflow.rb', line 80

def evaluate(expr)   = @client.evaluate(@name, expr)[:result]

#fill(sel, val) ⇒ Object



74
# File 'lib/browserctl/workflow.rb', line 74

def fill(sel, val)   = unwrap @client.fill(@name, sel, val)

#goto(url) ⇒ Object



73
# File 'lib/browserctl/workflow.rb', line 73

def goto(url)        = unwrap @client.goto(@name, url)

#screenshotObject



77
# File 'lib/browserctl/workflow.rb', line 77

def screenshot(**) = unwrap @client.screenshot(@name, **)

#snapshotObject



76
# File 'lib/browserctl/workflow.rb', line 76

def snapshot(**) = unwrap @client.snapshot(@name, **)

#urlObject



79
# File 'lib/browserctl/workflow.rb', line 79

def url              = @client.url(@name)[:url]

#wait_for(sel, timeout: 10) ⇒ Object



78
# File 'lib/browserctl/workflow.rb', line 78

def wait_for(sel, timeout: 10) = unwrap @client.wait_for(@name, sel, timeout: timeout)