Sha256: 96bb6a3a605065b26485995e621e00a5555fdeefe19f380a296ec731127b0e2d

Contents?: true

Size: 584 Bytes

Versions: 6

Compression:

Stored size: 584 Bytes

Contents

# frozen_string_literal: true

require_relative '../abstract/page'

class Login < Page
  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
  alias log_as login

  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

6 entries across 6 versions & 1 rubygems

Version Path
ruby_raider-0.9.3 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.9.2 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.9.1 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.9.0 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.8.9 lib/generators/automation/templates/partials/selenium_login.tt
ruby_raider-0.8.8 lib/generators/automation/templates/partials/selenium_login.tt