These are chat archives for cucumber/cucumber-ruby

10th
Aug 2016
Jon Seidel
@JESii
Aug 10 2016 01:57
To deal with your "View" question, @blueice349 , an easy way to deal with this would be to add an id (say id="view_a") and then just find it with (:css => '#view_a') where the '#" signifies an id to the css selector.
blueice349
@blueice349
Aug 10 2016 04:12

So looking at this custom step I wanted to pass in these types and it do the same thing, as they are the same type of element

And(/^I click "(View|Edit|Delete|)"$/) do |text|

  button_element = getButtonElementByText( text )
  button_element.click
end

so if I type And I click "Edit" OR And I click "View" OR And I click "Delete"

Jon Seidel
@JESii
Aug 10 2016 12:05
That's a fine approach, @blueice349 . FYI, you have an extra '|' after Delete.
blueice349
@blueice349
Aug 10 2016 13:29
Thanks... does anyone know a hack for getting HTTP response codes using cucumber-ruby / and Selenium webDriver