Reusable page panels

14 views
Skip to first unread message

Sanjay Hiremath

unread,
Jul 22, 2013, 6:13:45 AM7/22/13
to cucumber-...@googlegroups.com
Hi All,

As per the cucumber & cheese I have a question on Reusable page panels

- In my case, I have a scenario of breadcrumb. Where in I have the same header for breadcrumb on 4 different pages and each one is having a different panel. I have created 4 different methids for this.
Same link is having diffeent panel id on each page (e.g. @browser.link(:id => "assumptionsLink").click & @browser.div(:id => 'propertyDetailsPanel').link(:id => 'assumptionsLink').click
When(/^I click on the breadcrumb eligibility$/) do
  on_page(EligibilityPage).eligibility_breadcrumb
end

When(/^I click on the breadcrumb eligibility on property page$/) do
  on_page(PropertyDetailsPage).eligibility_Property_panel
end

When /^I click on the breadcrumb eligibility on cover page$/ do
  on_page(CoverDetailsPage).eligibility_cover_panel
end

When /^I click on the breadcrumb your details on cover page$/ do
on_page(CoverDetailsPage).your_detail_cover_panel
end

When /^I click on the breadcrumb your property on cover page$/ do
on_page(CoverDetailsPage).your_property_cover_panel
end

Is this the right way ???

Please let me know if there is a better way of making the code simple.

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