Class: Capybara::Selenium::Driver
- Inherits:
-
Object
- Object
- Capybara::Selenium::Driver
- Defined in:
- lib/howitzer/web/capybara_methods_proxy.rb
Overview
Remove this monkey patch after fixing the bugs in selenium-webdriver / capybara :nocov:
Instance Method Summary collapse
-
#current_url ⇒ Object
Known issue, works differently for real browsers github.com/seleniumhq/selenium/issues/1727.
- #title ⇒ Object
Instance Method Details
#current_url ⇒ Object
Known issue, works differently for real browsers github.com/seleniumhq/selenium/issues/1727
18 19 20 21 22 |
# File 'lib/howitzer/web/capybara_methods_proxy.rb', line 18 def current_url return browser.current_url unless within_frame? execute_script('return document.location.href') end |
#title ⇒ Object
10 11 12 13 14 |
# File 'lib/howitzer/web/capybara_methods_proxy.rb', line 10 def title return browser.title unless within_frame? find_xpath('/html/head/title').map { |n| n[:text] }.first.to_s end |