Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement