Read more

Select an unknown option with Capybara

Dominik Schöler
September 06, 2011Software engineer at makandra GmbH

When you don't know which options are available, but need to have an option selected, use this step.

When /^I select the second option from "([^"]*)"$/ do |id|
  second_option = find(:xpath, "//*[@id='#{id}']/option[2]").text
  select(second_option, :from => id)
end
Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot
Posted by Dominik Schöler to makandra dev (2011-09-06 15:00)