SHARE
TWEET

Untitled

a guest Aug 19th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. require_relative '../../features/pages/base'
  2. # Login page class
  3. class LoginPage < BasePage
  4.   attr_accessor :email, :password, :loginButton, :skipButton, :homeButton, :friendsTab, :friendTag, :voiceCallButton
  5.   attr_accessor :chatMessageInput, :leaveCallButton, :userSettings, :logOutButton
  6.  
  7.   def initialize
  8.     @email = Element.new(:xpath, "//input[@type='email']")
  9.  
  10.     @password = Element.new(:xpath, "//input[@type='password']")
  11.  
  12.     @loginButton = Element.new(:xpath, "//div[text()='Login']")
  13.  
  14.     @skipButton = Element.new(:xpath, "//*[text()='Skip']")
  15.  
  16.  
  17.   end
  18.  
  19.   def fill_form(user)
  20.     @email.visible?
  21.     @email.click
  22.     @email.send_keys user['email']
  23.     @password.click
  24.     @password.send_keys user['password']
  25.     @loginButton.click
  26.   end
  27.  
  28.   def load_home_page
  29.     visit ''
  30.   end
  31. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top