Sha256: a4b70adb889fa58e8f7f13dc10db88e5c3db50a45f48e2c3bab397fb52073f3a
Contents?: true
Size: 1.18 KB
Versions: 2
Compression:
Stored size: 1.18 KB
Contents
module Selenium module WebDriver class TargetLocator # # @api private # def initialize(driver) @bridge = driver.bridge end # # switch to the frame with the given id # def frame(id) @bridge.switchToFrame id end # # switch to the frame with the given id # # If given a block, this method will return to the original window after # block execution. # # @param id # A window handle # def window(id) if block_given? original = @bridge.getCurrentWindowHandle @bridge.switchToWindow id yield @bridge.switchToWindow original else @bridge.switchToWindow id end end # # get the active element # # @return [WebDriver::Element] # def active_element @bridge.switchToActiveElement end # # selects either the first frame on the page, or the main document when a page contains iframes. # def default_content @bridge.switchToDefaultContent end end # TargetLocator end # WebDriver end # Selenium
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
selenium-webdriver-0.0.16 | common/src/rb/lib/selenium/webdriver/target_locator.rb |
selenium-webdriver-0.0.15 | common/src/rb/lib/selenium/webdriver/target_locator.rb |