黄瓜数据表“没有将String隐式转换为整数”

时间:2017-06-16 09:46:32

标签: cucumber watir page-object-gem

我有下一个场景:

  Scenario: Product page contains right bar.
    When right bar contains customization elements:
      | Color selection | Color |

步骤:

When(/^right bar contains customization elements\:$/) do |table|
  data = table.raw
  on(ProductPage) do |page|
    expect(page.div_element(text: data['Color selection']).present?).to be_truthy
  end
end

我得到TypeError: no implicit conversion of String into Integerexpect(page.div_element(text: data['Color selection']).present?).to be_truthy

为什么呢?对于其他类似的场景,一切都还可以。

0 个答案:

没有答案