Class: EasyAutomation::LoadData
- Inherits:
-
Object
- Object
- EasyAutomation::LoadData
- Defined in:
- lib/easy_automation/load_data.rb
Class Method Summary collapse
-
.load_test_data(name, test_name, path) ⇒ Object
Loads test data based on test name.
-
.load_xpath_elements(name, path) ⇒ Object
Loads xpath elements based on page name.
Class Method Details
.load_test_data(name, test_name, path) ⇒ Object
Loads test data based on test name.
16 17 18 19 |
# File 'lib/easy_automation/load_data.rb', line 16 def self.load_test_data(name, test_name, path) data = YAML::load(File.read(File.join(path, 'data', "#{name}.yml"))) DataElements.new(data[test_name]) end |
.load_xpath_elements(name, path) ⇒ Object
Loads xpath elements based on page name.
27 28 29 |
# File 'lib/easy_automation/load_data.rb', line 27 def self.load_xpath_elements(name, path) DataElements.new(YAML::load(File.read(File.join(path, 'elements', "#{name.downcase}.yml")))) end |