Skip to content

Commit

Permalink
Merge pull request #15 from randoum/master
Browse files Browse the repository at this point in the history
Allow to use different drivers in the same test suite
  • Loading branch information
sbonebrake committed Oct 15, 2014
2 parents 4b26c27 + 9c765e6 commit ef8acaa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/appium_capybara/ext/session_ext.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
module Capybara
class Session
def reset!
# Next line is a work around for issue https://github.com/jnicklas/capybara/issues/1237
if @touched && driver.browser_initialized?
# Work around for issue https://github.com/jnicklas/capybara/issues/1237
browser_initialized = driver.respond_to?(:browser_initialized?) ? driver.browser_initialized? : true

if @touched && browser_initialized
driver.reset!
# Ugly hack to not run this assertion for Appium
assert_no_selector(:xpath, "/html/body/*") unless driver.instance_of? Appium::Capybara::Driver
Expand Down

0 comments on commit ef8acaa

Please sign in to comment.