<%- if automation == 'sparkling_ios' -%> require 'sparkling_watir/element' class AbstractPage attr_reader :app def initialize(app) @app = app end def to_s self.class.to_s.sub('Page', ' Page') end end <%- else -%> <% if web? -%> require_relative '../components/header' <% end -%> class AbstractPage <%- if automation == 'cross_platform' -%> include AppiumHelper <%- end -%> <%= ERB.new(File.read(File.expand_path('./partials/initialize_selector.tt', __dir__))).result(binding) -%> <%= ERB.new(File.read(File.expand_path('./partials/visit_method.tt', __dir__))).result(binding) -%> <%= ERB.new(File.read(File.expand_path('./partials/url_methods.tt', __dir__))).result(binding) -%> <%- if automation == 'selenium' -%> # Components def header Header.new(driver.find_element(id: 'customernav')) end <%- elsif automation == 'watir' -%> # Components def header Header.new(browser.element(id: 'customernav')) end <%- end -%> def to_s self.class.to_s.sub('Page', ' Page') end end <%- end -%>