For such cases, I use these two user steps:
Then /^the element matched by "([^\"]*)" should be visible$/ do |locator| selenium.should be_visible(locator) end Then /^the element matched by "([^\"]*)" should not be visible$/ do |locator| selenium.should_not be_visible(locator) end
Place them in the Ruby file in the step_definitions / directory.
So, in your case, instead of Then I should see a "something" to use . Then the element corresponding to "something" should be visible .
source share