Another Rspec issue!

20 views
Skip to first unread message

mark lane

unread,
May 21, 2017, 3:08:36 PM5/21/17
to Cucumber and Cheese
I would be really grateful for any help. I am getting the following error on my rspec assertion

Watir::Exception::MissingWayOfFindingObjectException: invalid attribute: :value
./features/step_definitions/Test_Feature1.rb:11:in `/^I should see the text "([^"]*)"$/'
./features/Test_Feature1.feature:6:in `Then I should see the text "Brook"'

My environment file

require 'rspec'
require 'rspec/expectations'
require 'page-object'
require 'cucumber'

World(PageObject::PageFactory)

My steps definition file:

Then(/^I should see the text "([^"]*)"$/) do |arg|
@browser.element(:value => 'Adopt Me!').wait_until_present
expect(@browser.text).to include arg
end


my feature file is:

Feature: Test Feature

Scenario: Test to make sure Cucumber is working
Given that I have loaded the dog site
When I select the view details link
Then I should see the text "Brook"



Reply all
Reply to author
Forward
0 new messages