Sha256: 7f0dc1ba5ca649ff0677ba817bc6b45db4a94d6dd4bfa7bf629fb9a0cd850d5b

Contents?: true

Size: 652 Bytes

Versions: 2

Compression:

Stored size: 652 Bytes

Contents

## Generic web steps
#------------------------------------------------------------------------------
When /^(?:|I )click on (.+)$/ do |locator|
  selector = selector_for(locator)
  find(selector, :message => "Unable to locate the element '#{selector}' to click on").click
end

Then /^(.+) should (not )?be visible$/ do |locator, boolean|
  selector = selector_for(locator)
  if boolean == 'not '
    page.has_no_css?("#{selector}")
  else
    page.has_css?("#{selector}", :visible => true)
  end
end

# scoping step for different windows
When /^(.*) in the "([^"]*)" window$/ do |s, window|
  page.driver.within_window(window) do
    step(s)
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
kiteditor-1.0.12 features/step_definitions/custom_web_steps.rb
mercury-rails-0.9.0 features/step_definitions/custom_web_steps.rb