Sha256: 85a549919714ad163bbe8ddf230b59aa2368e4415ffe93b85995ff7db8ee07b8

Contents?: true

Size: 735 Bytes

Versions: 19

Compression:

Stored size: 735 Bytes

Contents

# frozen_string_literal: true

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

class LoginPage < AbstractPage
  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
  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

19 entries across 19 versions & 1 rubygems

Version Path
ruby_raider-0.7.9 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.7.8 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.7.7 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.7.6 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.7.5 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.7.4 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.7.3 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.7.2 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.7.1 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.7.0 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.6.9 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.6.8 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.6.7 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.6.6 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.6.5 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.6.4 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.6.3 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.6.2 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.6.1 lib/generators/automation/templates/partials/selenium_login.tt