appium_lib 0.15.2 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.15.2' unless defined? ::Appium::VERSION
5
- DATE = '2013-12-23' unless defined? ::Appium::DATE
4
+ VERSION = '0.16.0' unless defined? ::Appium::VERSION
5
+ DATE = '2014-01-09' unless defined? ::Appium::DATE
6
6
  end
@@ -100,15 +100,22 @@ module Appium::Ios
100
100
 
101
101
  # @private
102
102
  def fix_space s
103
+ # if s is an int, we can't call .empty
104
+ return nil if s.nil? || (s.respond_to?(:empty) && s.empty?)
103
105
  # ints don't respond to force encoding
104
- return s unless s.respond_to? :force_encoding
106
+ # ensure we're converting to a string
107
+ unless s.respond_to? :force_encoding
108
+ s_s = s.to_s
109
+ return s_s.empty? ? nil : s_s
110
+ end
105
111
  # char code 160 (name, label) vs 32 (value) will break comparison.
106
112
  # convert string to binary and remove 160.
107
113
  # \xC2\xA0
108
- s.force_encoding('binary').gsub("\xC2\xA0".force_encoding('binary'), ' ') if s
114
+ s = s.force_encoding('binary').gsub("\xC2\xA0".force_encoding('binary'), ' ') if s
115
+ s.empty? ? nil : s
109
116
  end
110
117
 
111
- unless empty(element)
118
+ unless empty(element) || element['visible'] == false
112
119
  puts "#{element['type']}"
113
120
  name = fix_space element['name']
114
121
  label = fix_space element['label']
@@ -6,6 +6,12 @@ module Appium::Ios
6
6
  # will trigger only when invoked.
7
7
  def patch_webdriver_element
8
8
  Selenium::WebDriver::Element.class_eval do
9
+ # Enable access to iOS accessibility label
10
+ # accessiblity identifier is supported as 'name'
11
+ def label
12
+ self.attribute('label')
13
+ end
14
+
9
15
  # Cross platform way of entering text into a textfield
10
16
  def type text
11
17
  # enter text then tap window to hide the keyboard.
data/release_notes.md CHANGED
@@ -1,3 +1,9 @@
1
+ #### v0.15.2 2013-12-23
2
+
3
+ - [35b84fd](https://github.com/appium/ruby_lib/commit/35b84fd4a0dcf37fe136451c9bcfa936e1017023) Release 0.15.2
4
+ - [23504ea](https://github.com/appium/ruby_lib/commit/23504ea17c483650342832a204acac542a77b48b) Update selenium-webdriver for driver.manage.logs support
5
+
6
+
1
7
  #### v0.15.1 2013-12-13
2
8
 
3
9
  - [8340d99](https://github.com/appium/ruby_lib/commit/8340d993185ec22f02ca4ce3a3d24e65f367f3e3) Release 0.15.1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.2
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - code@bootstraponline.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-23 00:00:00.000000000 Z
11
+ date: 2014-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver