Unable to get the unorderedlist working as mentioned in cucumber & cheese doc

16 views
Skip to first unread message

Sanjay Hiremath

unread,
Jul 18, 2013, 9:47:04 AM7/18/13
to cucumber-...@googlegroups.com
Hi,

Can anyone please help me on selecting the list items in the unordered list ?
I am not able to find the expected value 

Please find my scenario below:
Scenario: Add claim history and ensure that the claim details are displayed
    When I select yes for claim made option
    And I fill in your cover page
    And I click add item button
    Then I should see claim date "12/01/2001"

Step Definition: 
Then(/^I should see claim date "(.*?)"$/) do |claim|
  on_page(CoverDetailsPage).claims_list.should include claim
end

cover_page.rb
  div(:claims_div, :id => 'claims')
  unordered_list(:claims_item) do |page|
  page.claims_div_element.unordered_list_element
  end

  def claims_list
    claims_item_element.text
  end

I am getting error - RSpec::Expectations::ExpectationNotMetError: expected "" to include "12/01/2001"

Many Thanks,
Sanjay
Reply all
Reply to author
Forward
0 new messages