Sha256: 853c86e30bb5269954c15e77cb9ddb562c6ad92a4f01847bb58d36c5825b15b2
Contents?: true
Size: 609 Bytes
Versions: 2
Compression:
Stored size: 609 Bytes
Contents
require 'uia/version' require 'uia/library' require 'uia/element' require 'uia/library/constants' module Uia class BadLocator < StandardError; end def find_element(how) case when how[:id] Element.new Library.find_by_id(how[:id]) when how[:pid] Element.new Library.find_by_pid(how[:pid]) when how[:runtime_id] Element.new Library.find_by_runtime_id(how[:runtime_id]) when how[:handle] Element.new Library.find_by_handle(how[:handle]) else raise BadLocator, "#{how} is not a valid locator" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
uia-0.0.5.1 | lib/uia.rb |
uia-0.0.5 | lib/uia.rb |