Module: Initialize
- Included in:
- DestinationServicesGUI, DestinationServicesGUI::Checkout, DestinationServicesGUI::Detail, DestinationServicesGUI::Results, DestinationServicesGUI::Search
- Defined in:
- lib/page_objects/modules/initialize.rb
Instance Attribute Summary collapse
-
#browser ⇒ Object
readonly
Returns the value of attribute browser.
Instance Method Summary collapse
- #clear_search_params ⇒ Object
- #search_params ⇒ Object
- #set_browser(browser) ⇒ Object
- #set_cookie(data = {}) ⇒ Object
Instance Attribute Details
#browser ⇒ Object (readonly)
Returns the value of attribute browser.
4 5 6 |
# File 'lib/page_objects/modules/initialize.rb', line 4 def browser @browser end |
Instance Method Details
#clear_search_params ⇒ Object
6 7 8 |
# File 'lib/page_objects/modules/initialize.rb', line 6 def clear_search_params DestinationServicesGUI::CONFIG[:search_params] = {} end |
#search_params ⇒ Object
10 11 12 |
# File 'lib/page_objects/modules/initialize.rb', line 10 def search_params DestinationServicesGUI::CONFIG[:search_params] end |
#set_browser(browser) ⇒ Object
14 15 16 |
# File 'lib/page_objects/modules/initialize.rb', line 14 def set_browser(browser) DestinationServicesGUI::CONFIG[:browser] = browser end |
#set_cookie(data = {}) ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/page_objects/modules/initialize.rb', line 22 def (data = {}) if data.nil? || data.empty? raise('Cookies should have a name and value') end data.each do | key, value | browser..add(key.to_s, value.to_s, :path => '/') end end |