Sha256: 980160d8f53022e3f8c645f50dba3e54e89c1c27a57dc2eb15bc34d95b52e6fe
Contents?: true
Size: 1.15 KB
Versions: 18
Compression:
Stored size: 1.15 KB
Contents
module TrueAutomation ## # # TrueAutomation::Helpers class provides helper method to use # TrueAutomation.IO Smart Locators instead of Selenium or Capybara locators. # # To record an element for the first time use ta(ta_name, initial_locator) syntax. # # *ta_name* is TrueAutomation Element name. We recommend to use # namespaced syntax. E.g. _pageName:widgetName:elementName_ # *initial_locator* is Selenium/Capybara locator to use to find element # for the first time. If you change initial locator in your # code, TrueAutomation element record will be rewritten # during next test run. # For example: # # find(:xpath, ta('true:automation:name', '//initialXpathLocator')) # find(:css, ta('true:automation:name', '.initialCSSSelector')) # click(ta('true:automation:name', 'Login')) # class Helpers ## # # @return [String] TrueAutomation.IO locator # def self.ta(name, locator = '') if !locator.empty? "#{locator}__ta__#{name}__ta__" else "__taonly__#{name}__taonly__" end end end end
Version data entries
18 entries across 18 versions & 1 rubygems