Sha256: ae96d5f4ed16c0ed4169322606f4eb525b7224506813b8a5742485fb9498ea1a
Contents?: true
Size: 546 Bytes
Versions: 2
Compression:
Stored size: 546 Bytes
Contents
# frozen_string_literal: true 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
aranha-selenium-0.6.0 | lib/aranha/selenium/session/find.rb |
aranha-selenium-0.5.0 | lib/aranha/selenium/session/find.rb |