Created
April 21, 2010 05:32
-
-
Save gongo/373462 to your computer and use it in GitHub Desktop.
capybara に frame を移動する(フォーカスを別にあてる)メソッドがないので、それを追加。ついでに selenium driver 用の メソッドを追加
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'capybara/session' | |
module Capybara | |
class Session | |
Capybara::Session::DSL_METHODS << :switch_frame | |
def_delegator :driver, :switch_frame | |
end | |
end | |
require 'capybara/driver/selenium_driver' | |
class Capybara::Driver::Selenium < Capybara::Driver::Base | |
def switch_frame(id) | |
browser.switch_to.frame(id) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment