0

我想为我的项目使用页面对象,并且需要知道如何单击链接,因为我尝试了从谷歌搜索中获得的方法,但它不起作用。步骤定义是

Given /^I navigate to the RCM Home Page$/ do
 visit_page HomePage
end

When /^I click the Show Filters Link$/ do
 @current_page.show_filters
end

我的页面对象类文件是

class HomePage
 include PageObject
 page_url Common.get_url('rcm')
 link(:show_filters, :id       => "portletComponentWorkList_viewNormalModeWorkList_viewPanel_showFiltersLink")
end

我的 .feature 文件是

Feature: RCM Workspace basic features test

 Scenario: Perform basic operations on RCM project
  Given I navigate to the RCM Home Page
  When I click the Show Filters Link
4

1 回答 1

-1
@current_page.show_filters.click
于 2013-11-08T11:22:29.730 回答