I am getting this error when trying to click a button with umlaut:
syntax error, unexpected $end, expecting keyword_end
click_on 'Neue Firma hinzufц╪gen'
I am testing with Ruby & Capabara.
##Create_User_spec.rb
require 'acceptance/acceptance_helper'
## Feature 'Create User'
feature 'Create User' do ##
Scenario 'Create a User'
scenario 'Create a User' do
## Login into the service
visit 'url'
fill_in 'User-username', :with => 'test'
fill_in 'User-password', :with => 'test'
click_on 'login'
click_link 'Test'
click_on 'Neue Firma hinzufügen'
end
end
This also can happen if you have a stray .
trailing a method, so check for those as well.
It happened to me because of special characters, in my case portuguese signs. I believe the problem is the "ü" in hinzufügen. Looking for a solution yet.
Edit: found a solution!
I added the following to the very top of the rb file:
# encoding: utf-8
(don't miss the # sign, it is needed)
This error due to an extra end.Mean you have written an extra end with no matching do.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With