lib/kraken-mobile/steps/web/kraken_steps.rb in kraken-mobile-1.0.8 vs lib/kraken-mobile/steps/web/kraken_steps.rb in kraken-mobile-1.0.9

- old
+ new

@@ -31,17 +31,35 @@ Then(/^I click on element having id "(.*?)"$/) do |id| @driver.find_element(:id, id).click sleep 2 end +Then(/^I wait$/) do + sleep 5 +end + Then(/^I wait for (\d+) seconds$/) do |seconds| return if seconds.nil? sleep seconds.to_i end Then(/^I should see text "(.*?)"$/) do |text| @driver.page_source.include?(text) +end + +Then(/^I click on element having css selector "(.*?)"$/) do |selector| + @driver.find_element(:css, selector).click + sleep 2 +end + +Then( + /^I select option with value "(.*?)" for dropdown with id "(.*?)"$/ +) do |op_value, sel_id| + drop = @driver.find_element(:id, sel_id) + choose = Selenium::WebDriver::Support::Select.new(drop) + choose.select_by(:value, op_value) + sleep 2 end # Kraken Steps Then( /^I send a signal to user (\d+) containing "([^\"]*)"$/