Sha256: e85e15098895237a9055954bc5e689909221b393380fab9b931942d41dbaf2c8
Contents?: true
Size: 576 Bytes
Versions: 7
Compression:
Stored size: 576 Bytes
Contents
# frozen_string_literal: true require 'selenium-webdriver' module Aranha module Selenium class Session < ::SimpleDelegator module Find # @return [Selenium::WebDriver::Element, nil] def find_element(*args, &block) return args.first if args.count >= 1 && args.first.is_a?(::Selenium::WebDriver::Element) __getobj__.find_element(*args, &block) end def find_or_not_element(find_element_args) r = find_elements(find_element_args) r.any? ? r.first : nil end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems