Sha256: ba73f8f47bdb34d7123f7f9aaa3545116855fdda8a28415bdbacf85ad5e725c7

Contents?: true

Size: 578 Bytes

Versions: 20

Compression:

Stored size: 578 Bytes

Contents

# frozen_string_literal: true

require_relative '../abstract/abstract_page'

class LoginPage < AbstractPage
<%- if automation == 'selenium' -%>
  using Raider::SeleniumHelper
<%- end -%>

  def url(_page)
    'index.html'
  end

  # Actions

  def login
  <%- if automation == 'watir' -%>
    login_button.click
    <%- else -%>
    login_button.click_when_present
    <%- end -%>
  end

  private

  # Elements

  def login_button
  <%- if automation == 'watir' -%>
    browser.element(id: 'log-in')
  <%- else -%>
    driver.find_element(:id, 'log-in')
  <%- end -%>
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
ruby_raider-0.6.8 lib/generators/automation/templates/partials/visual_login.tt
ruby_raider-0.6.7 lib/generators/automation/templates/partials/visual_login.tt
ruby_raider-0.6.6 lib/generators/automation/templates/partials/visual_login.tt
ruby_raider-0.6.5 lib/generators/automation/templates/partials/visual_login.tt
ruby_raider-0.6.4 lib/generators/automation/templates/partials/visual_login.tt
ruby_raider-0.6.3 lib/generators/automation/templates/partials/visual_login.tt
ruby_raider-0.6.2 lib/generators/automation/templates/partials/visual_login.tt
ruby_raider-0.6.1 lib/generators/automation/templates/partials/visual_login.tt
ruby_raider-0.6.0 lib/generators/automation/templates/partials/visual_login.tt
ruby_raider-0.5.9 lib/generators/automation/templates/partials/visual_login.tt
ruby_raider-0.5.8 lib/generators/automation/templates/partials/visual_login.tt
ruby_raider-0.5.7 lib/generators/automation/templates/partials/visual_login.tt
ruby_raider-0.5.6 lib/generators/templates/automation/partials/visual_login.tt
ruby_raider-0.5.5 lib/generators/templates/automation/partials/visual_login.tt
ruby_raider-0.5.4 lib/generators/templates/automation/partials/visual_login.tt
ruby_raider-0.5.3 lib/generators/templates/automation/partials/visual_login.tt
ruby_raider-0.5.2 lib/generators/templates/automation/partials/visual_login.tt
ruby_raider-0.5.1 lib/generators/templates/automation/partials/visual_login.tt
ruby_raider-0.5.0 lib/generators/templates/automation/partials/visual_login.tt
ruby_raider-0.4.9 lib/generators/templates/automation/partials/visual_login.tt