Sha256: c7b8a14c415de26d4f6ccba05a7313de5423f2785b2523f223877b7db62f9b81
Contents?: true
Size: 891 Bytes
Versions: 9
Compression:
Stored size: 891 Bytes
Contents
module PageObject module Platforms module SeleniumWebDriver def self.create_page_object(browser) SeleniumWebDriver::PageObject.new(browser) end def self.is_for?(browser) require 'selenium-webdriver' browser.is_a?(::Selenium::WebDriver::Driver) || browser.is_a?(::Selenium::WebDriver::Element) end def self.browser_for root return root if root.is_a?(::Selenium::WebDriver::Driver) Selenium::WebDriver::Driver.new(root.send(:bridge)) end def self.root_element_for root Elements::Element.new root, platform: :selenium_webdriver if root.is_a?(::Selenium::WebDriver::Element) end def self.browser_root_for browser browser.find_element(tag_name: 'html') end end end end PageObject::Platforms.register(:selenium_webdriver, PageObject::Platforms::SeleniumWebDriver)
Version data entries
9 entries across 9 versions & 2 rubygems