BDD with PageObject

Create child page - login page

And "login.rb":

touch login.rb

alt text

We need to copy following content to "login.rb" and delete them from "base_page.rb".

class Login < Page

def loginAs (username,password)
    clickElementBy("id", "nav-signin-text")
    inputToElementWith("id", "ap_email", username)
    inputToElementWith("id", "ap_password", password)
    clickElementBy("id","signInSubmit-input")
end

end

alt text

alt text