Sha256: bd89d24c0af4003374331ea6c8a6d01230bf777355fbe3a398b6cd0f7be9fa07
Contents?: true
Size: 926 Bytes
Versions: 12
Compression:
Stored size: 926 Bytes
Contents
# -*- encoding : utf-8 -*- # rubocop:disable Lint/AmbiguousRegexpLiteral When /^I open a new window for (.*)$/ do |account_name| str = <<END_TAG window.open("", "#{account_name}", "height=600,width=800"); END_TAG page.execute_script(str) page.driver.browser.switch_to.window(page.driver.browser.window_handles.last) email = Card[account_name].account.email visit "/update/:signin?card[subcards][%2B*email][content]=#{email}&"\ "card[subcards][%2B*password][content]=joe_pass" end When /I switch to (.+) window$/ do |window| if window == "first" page.driver.browser.switch_to.window(page.driver.browser.window_handles.first) elsif window == "last" page.driver.browser.switch_to.window(page.driver.browser.window_handles.last) end end When /^I close window$/ do page.execute_script("window.close();") page.driver.browser.switch_to.window(page.driver.browser.window_handles.last) end
Version data entries
12 entries across 12 versions & 2 rubygems