Sha256: 57959d9eb7aceeded3a294b27e8b08f55a4ddf8e81566e095fa319c3b3574a03

Contents?: true

Size: 752 Bytes

Versions: 18

Compression:

Stored size: 752 Bytes

Contents

require_relative '../abstract/abstract_page'
require_relative '../components/header_component'

class LoginPage < AbstractPage
  using Raider::SeleniumHelper

  def url(_page)
    'index.php?rt=account/login'
  end

  # Actions

  def login(username, password)
    username_field.send_keys username
    password_field.send_keys password
    login_button.click_when_present
  end

  # Components

  def header
    HeaderComponent.new(@driver.find_element(class: 'menu_text'))
  end

  private

  # Elements

  def username_field
    @driver.find_element(id: 'loginFrm_loginname')
  end

  def password_field
    @driver.find_element(id: 'loginFrm_password')
  end

  def login_button
    @driver.find_element(xpath: "//button[@title='Login']")
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
ruby_raider-0.4.0 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.3.9 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.3.8 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.3.7 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.3.6 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.3.5 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.3.4 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.3.3 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.3.2 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.3.1 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.3.0 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.2.9 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.2.8 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.2.7 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.2.6 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.2.5 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.2.4 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.2.3 lib/generators/templates/automation/partials/selenium_login.tt