Class: Browserctl::PageProxy
- Inherits:
-
Object
- Object
- Browserctl::PageProxy
- Defined in:
- lib/browserctl/workflow.rb
Instance Method Summary collapse
- #click(sel) ⇒ Object
- #evaluate(expr) ⇒ Object
- #fill(sel, val) ⇒ Object
- #goto(url) ⇒ Object
-
#initialize(name, client) ⇒ PageProxy
constructor
A new instance of PageProxy.
- #screenshot ⇒ Object
- #snapshot ⇒ Object
- #url ⇒ Object
- #wait_for(sel, timeout: 10) ⇒ Object
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) |
#screenshot ⇒ Object
77 |
# File 'lib/browserctl/workflow.rb', line 77 def screenshot(**) = unwrap @client.screenshot(@name, **) |
#snapshot ⇒ Object
76 |
# File 'lib/browserctl/workflow.rb', line 76 def snapshot(**) = unwrap @client.snapshot(@name, **) |
#url ⇒ Object
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) |