Weird '(eval):2:in `click_on' error when running cucumber tests

10 views
Skip to first unread message

loga....@gmail.com

unread,
Jul 18, 2011, 2:18:30 PM7/18/11
to selenium-ruby
The following code, when run using Cucumber creates the following
error:

Backtrace:

Scenario: Successful login to
Site # features
\login_to_site.feature:10
When you attempt to login, as
'it.god' # cukesalad-0.7.0/lib/
cukesalad/cucumber_steps.rb:18
wrong number of arguments (2 for 1) (ArgumentError)
(eval):2:in `click_on'
./features/tasks/shared_tasks/login.rb:7:in `block in <top
(required)>'
features\login_to_fulcrum.feature:12:in `When you attempt to
login, as 'it.god''

Here is the step in the feature file:

When you attempt to login, as 'it.god'

Here is the task level code:

in_order_to 'login', as: :name, with_password: :pass do
username = the :name
password = username if the( :pass ).nil?
password = the :pass if password.nil?
enter :username, username
enter :password, password
press_the 'Log In'
end

Any suggestions?

Thanks,

Loga
Reply all
Reply to author
Forward
0 new messages