Class: TestSteps::Handlers::OpenUrl
- Defined in:
- lib/functions/handlers/open_url.rb
Overview
Open URL function.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#initialize, #login_check, #login_process, #mem_word_check, #open_url_process, perform, #portal_mem_word, register
Constructor Details
This class inherits a constructor from TestSteps::Handlers::Base
Class Method Details
.check_current_url(url) ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/functions/handlers/open_url.rb', line 23 def self.check_current_url(url) url_check = Browser.b.url if url_check == url MyLog.log.info("Opened URL: #{url}") return true else MyLog.log.warn("URL not open: #{url} - opened #{url_check} instead") return false end end |
Instance Method Details
#perform ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/functions/handlers/open_url.rb', line 11 def perform Browser.open_browser url = if ENV[@value] ENV[@value.to_s] else @value end Browser.b.goto(url) OpenUrl.check_current_url(url) end |