Class: Hercules::Maestro::Browser
- Inherits:
-
Object
- Object
- Hercules::Maestro::Browser
- Defined in:
- lib/uptime_monitor/maestro_broswer.rb
Instance Attribute Summary collapse
-
#browser ⇒ Object
readonly
Returns the value of attribute browser.
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
-
#s_expr ⇒ Object
readonly
Returns the value of attribute s_expr.
Instance Method Summary collapse
- #close ⇒ Object
- #exists?(script) ⇒ Boolean
-
#initialize(url, browser_name = "firefox", is_headless = false) ⇒ Browser
constructor
A new instance of Browser.
Constructor Details
#initialize(url, browser_name = "firefox", is_headless = false) ⇒ Browser
Returns a new instance of Browser.
7 8 9 10 |
# File 'lib/uptime_monitor/maestro_broswer.rb', line 7 def initialize(url, browser_name = "firefox", is_headless = false) @parser = Hercules::UptimeMonitor::MaestroLangParser.new @browser = Hercules::UptimeMonitor::Browser.new(url, browser_name, is_headless) end |
Instance Attribute Details
#browser ⇒ Object (readonly)
Returns the value of attribute browser.
4 5 6 |
# File 'lib/uptime_monitor/maestro_broswer.rb', line 4 def browser @browser end |
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
5 6 7 |
# File 'lib/uptime_monitor/maestro_broswer.rb', line 5 def parser @parser end |
#s_expr ⇒ Object (readonly)
Returns the value of attribute s_expr.
6 7 8 |
# File 'lib/uptime_monitor/maestro_broswer.rb', line 6 def s_expr @s_expr end |
Instance Method Details
#close ⇒ Object
15 16 17 |
# File 'lib/uptime_monitor/maestro_broswer.rb', line 15 def close @browser.close end |
#exists?(script) ⇒ Boolean
11 12 13 14 |
# File 'lib/uptime_monitor/maestro_broswer.rb', line 11 def exists?(script) @s_expr = @parser.parse(script).first @browser.exists? @s_expr end |