Sha256: e09411b4159919615482d1e8b1879235a06435ff6771c592d56e1642bbb517b7

Contents?: true

Size: 735 Bytes

Versions: 28

Compression:

Stored size: 735 Bytes

Contents

class Selenium::WebDriver::Driver
  def fe_find_element(*args)
    find_element(*args)
  rescue Selenium::WebDriver::Error::NoSuchElementError
    nil
  end

  def fe_find_elements(*args)
    find_elements(*args)
  rescue Selenium::WebDriver::Error::NoSuchElementError
    nil
  end

  def at_xpath(path, wait: nil)
    if wait.present?
      driver_wait = Selenium::WebDriver::Wait.new(timeout: wait)
      driver_wait.until { fe_find_element(:xpath, path) }
    end
    fe_find_element(:xpath, path)
  end

  def xpath(path, wait: nil)
    if wait.present?
      driver_wait = Selenium::WebDriver::Wait.new(timeout: wait)
      driver_wait.until { fe_find_elements(:xpath, path) }
    end
    fe_find_elements(:xpath, path)
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
fe_core_ext-0.1.32 lib/fe_core_ext/gem_ext/selenium_webdriver.rb
fe_core_ext-0.1.31 lib/fe_core_ext/gem_ext/selenium_webdriver.rb
fe_core_ext-0.1.30 lib/fe_core_ext/gem_ext/selenium_webdriver.rb
fe_core_ext-0.1.29 lib/fe_core_ext/gem_ext/selenium_webdriver.rb
fe_core_ext-0.1.28 lib/fe_core_ext/gem_ext/selenium_webdriver.rb
fe_core_ext-0.1.27 lib/fe_core_ext/gem_ext/selenium_webdriver.rb
fe_core_ext-0.1.26 lib/fe_core_ext/gem_ext/selenium_webdriver.rb
fe_core_ext-0.1.25 lib/fe_core_ext/gem_ext/selenium_webdriver.rb
fe_core_ext-0.1.24 lib/fe_core_ext/gem_ext/selenium_webdriver.rb
fe_core_ext-0.1.23 lib/fe_core_ext/gem_ext/selenium_webdriver.rb
fe_core_ext-0.1.22 lib/fe_core_ext/gem_ext/selenium_webdriver.rb
fe_core_ext-0.1.21 lib/fe_core_ext/gem_ext/selenium_webdriver.rb
fe_core_ext-0.1.20 lib/fe_core_ext/gem_ext/selenium_webdriver.rb
fe_core_ext-0.1.19 lib/fe_core_ext/gem_ext/selenium_webdriver.rb
fe_core_ext-0.1.18 lib/fe_core_ext/gem_ext/selenium_webdriver.rb
fe_core_ext-0.1.17 lib/fe_core_ext/gem_ext/selenium_webdriver.rb
fe_core_ext-0.1.16 lib/fe_core_ext/gem_ext/selenium_webdriver.rb
fe_core_ext-0.1.15 lib/fe_core_ext/gem_ext/selenium_webdriver.rb
fe_core_ext-0.1.14 lib/fe_core_ext/gem_ext/selenium_webdriver.rb
fe_core_ext-0.1.13 lib/fe_core_ext/gem_ext/selenium_webdriver.rb