Closed toshidavila closed 9 years ago
Can you explain why you think it's Cucumber that's doing this?
Hi Matt,
Because sometimes the visit
method works as expected. Meaning my variable is www.assembla.com and it redirects me there but sometimes it adds this text /content/index-m.php
with apparently no reason and randomly.
I don't know what's causing this. Do you have any idea?
Do you know which code implements the visit
method?
Hi Matt,
I must say I am new with cucumber. This is the code in my steps.rb file
#BACKGROUND:
Given (/^I am on login page$/) do
visit $page
end
It works OK most of the time but as I mentioned, sometimes that text is added at the end of the URL.
The visit
method you're using is probably the one implemented by http://github.com/jnicklas/capybara. Do you have that gem as a dependency in your project?
Cucumber's responsibility only goes as far as finding step definition to match the words you used in your feature file, and then executing the code in the step definition block. The code that runs in the block is not really anything to do with Cucumber, sorry.
My guess is that either your app is doing a redirect, or whatever logic sets the $page
variable is behaving unexpectedly. Either way, I can't see how Cucumber could be responsible for this. :smile:
Hi Matt,
I see. Thank you so much for your help. I'll start looking at other places to get this resolved.
Again thank you!
No problem, I know it's confusing when you're new to something. Good luck!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
It happens from time to time and I don't know why.
It randomly adds /content/index-m.php at the end of my URL which makes the scenario fail because the page is never loaded because that specific url doesn't exists.