appium_lib 0.5.5 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  module Appium
3
3
  # Version and Date are defined on the 'Appium' module, not 'Appium::Common'
4
- VERSION = '0.5.5' unless defined? ::Appium::VERSION
4
+ VERSION = '0.5.6' unless defined? ::Appium::VERSION
5
5
  DATE = '2013-05-31' unless defined? ::Appium::DATE
6
6
  end
@@ -63,12 +63,12 @@ module Appium::Ios
63
63
  # prefer value search. this may error with:
64
64
  # Can't use in/contains operator with collection 1
65
65
  js = first_ele_js "value contains[c] '#{text}'"
66
- ignore { ele = execute_script js }
66
+ ele = ignore { execute_script js }
67
67
 
68
68
  # now search name and label if the value search didn't match.
69
69
  unless ele
70
70
  js = first_ele_js "name contains[c] '#{text}' || label contains[c] '#{text}'"
71
- ignore { ele ||= execute_script js }
71
+ ele = ignore { execute_script js }
72
72
  end
73
73
 
74
74
  # manually raise error if no element was found
@@ -81,10 +81,14 @@ module Appium::Ios
81
81
  # @param text [String] the text to search for
82
82
  # @return [Array<Element>] all matching elements
83
83
  def finds text
84
- # returnElems requires a wrapped $(element).
85
- # must call toArray when using withPredicate instead of firstWithPredicate.
86
- js = all_ele_js "name contains[c] '#{text}' || label contains[c] '#{text}' || value contains[c] '#{text}'"
87
- execute_script js
84
+ eles = []
85
+ # value contains may error
86
+ js = all_ele_js "value contains[c] '#{text}'"
87
+ eles = ignore { execute_script js }
88
+
89
+ js = all_ele_js "name contains[c] '#{text}' || label contains[c] '#{text}'"
90
+ eles += ignore { execute_script js }
91
+ eles
88
92
  end
89
93
 
90
94
  # Return the first element matching text.
data/readme.md CHANGED
@@ -1,4 +1,4 @@
1
- #### appium_lib [![Dependency Status](https://gemnasium.com/appium/ruby_lib.png)](https://gemnasium.com/appium/ruby_lib)
1
+ #### appium_lib [![Gem Version](https://badge.fury.io/rb/appium_lib.png)](http://rubygems.org/gems/appium_lib)[![Dependency Status](https://gemnasium.com/appium/ruby_lib.png)](https://gemnasium.com/appium/ruby_lib)
2
2
 
3
3
  - [appium_lib on RubyGems](https://rubygems.org/gems/appium_lib)
4
4
  - [Documentation for appium_lib](http://www.rubydoc.info/github/appium/ruby_lib/master/frames)
@@ -1,3 +1,11 @@
1
+ #### v0.5.5 2013-05-31
2
+
3
+ - [e061482](https://github.com/appium/ruby_lib/commit/e061482a0f712914c5fb21da92da357b79e07b87) Release 0.5.5
4
+ - [82f9c58](https://github.com/appium/ruby_lib/commit/82f9c580d68189b669d3f5029914f00c8fd17c06) Fix value contains operator
5
+ - [c5b8d84](https://github.com/appium/ruby_lib/commit/c5b8d849b29f46beebd1aea4ff59f2de6edd9dc6) Update readme.md
6
+ - [c14fbb3](https://github.com/appium/ruby_lib/commit/c14fbb3c39b0c33a5d42dfe9da5427cebb9ec336) Add version badge
7
+
8
+
1
9
  #### v0.5.4 2013-05-28
2
10
 
3
11
  - [9e95106](https://github.com/appium/ruby_lib/commit/9e951061b9da6cee7b90ee310bbbef2b7c660fb1) Release 0.5.4
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  version: '0'
151
151
  segments:
152
152
  - 0
153
- hash: -3854797362292402686
153
+ hash: -2058615491308074807
154
154
  requirements: []
155
155
  rubyforge_project:
156
156
  rubygems_version: 1.8.25