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.



98
99
100
101
# File 'lib/browserctl/workflow.rb', line 98

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

Instance Method Details

#click(sel) ⇒ Object



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

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

#evaluate(expr) ⇒ Object



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

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

#fill(sel, val) ⇒ Object



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

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

#goto(url) ⇒ Object



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

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

#screenshotObject



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

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

#snapshotObject



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

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

#urlObject



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

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

#wait_for(sel, timeout: 10) ⇒ Object



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

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

#watch(sel, timeout: 30) ⇒ Object



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

def watch(sel, timeout: 30)    = unwrap @client.watch(@name, sel, timeout: timeout)