Ruby login method

0

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?

    
asked by anonymous 15.11.2018 / 14:12

1 answer

1

Before you begin, remember to always follow the guidelines and language conventions, even more by using the Ruby on Rails framework, which is known by the

15.11.2018 / 17:40