I'm trying to login with Ruby, however it's displaying the error
undefined local variable or method 'login' for #<Object:0x00000000059ccea8> (NameError)
I've set up the class:
class Login <SitePrism::Page
element :username_fild, "input[placeholder='Username']"
element :password_fild, "input[placeholder='Password']"
element :Login_buton, "input[title='Log In']"
def Login (nome, senha)
username_fild.set(nome)
password_fild.set(nome)
Login_button.click
end
end
and I passed the variable:
Dado("que esteja na tela de cadastro do SuiteCRM") do
Home.new.load
@login = login.new
@login.load
@login.login("will","will")
end
When I run it generates the error:
undefined local variable or method 'login' for #<Object:0x00000000059ccea8> (NameError)
Can anyone help to solve this problem?