Sha256: e322d7ef6e9e7792802e52076462ae5c5c459d18430b5756cdcaf07c4d087880

Contents?: true

Size: 749 Bytes

Versions: 20

Compression:

Stored size: 749 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

20 entries across 20 versions & 1 rubygems

Version Path
ruby_raider-0.6.0 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.5.9 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.5.8 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.5.7 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.5.6 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.5.5 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.5.4 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.5.3 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.5.2 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.5.1 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.5.0 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.4.9 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.4.8 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.4.7 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.4.6 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.4.5 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.4.4 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.4.3 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.4.2 lib/generators/templates/automation/partials/selenium_login.tt
ruby_raider-0.4.1 lib/generators/templates/automation/partials/selenium_login.tt