appium_lib 0.3.9 → 0.3.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzE4OGFmMzI5YThhZTUzMjM5ZjY4ZmI4NDRjZjAyNjE1MzMxNDk0NQ==
4
+ MGZlYWZjN2YyMmI3ZGRmMDE0MzM3MDRhNGZhYmIzYWYzNDQ1NTVkNQ==
5
5
  data.tar.gz: !binary |-
6
- Y2EzYzU3YzM2NzI4YTFkODlmYWIxMWNmY2IxN2IwZjg5MzU4ZGY3ZQ==
6
+ NmFjMTQ1YTAxNmI2NDIzOGI3MDFjNzZmYjRiODZjM2FiNTc1YTJkMw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NmJjNTdmYzIxMjJkZTgwMzM0ZmZmZTFiMmU1NzExNmVmODlmZGIzMTRlMDBj
10
- ZGZjYWY3NDUxYjVhM2UzZGI4NGFmZWY2MDVmYzgwYjc1YTVlOGU4ZDY5NTU1
11
- ZTI1M2NjMzBkOWE3ZGMyNWE4ODNiOTBiY2Q5MzJhNzAxZTA1MjQ=
9
+ ZGZjYzA5NTQwMjAyM2FlNDljYjEzZTdhZDhlYjE0OWU1NDc1NzhiZmRhMWI1
10
+ MWNlMDQ4ZGRjYjMzYjFlMmMwMzc5Y2Q0MjYxYzJiOTAyM2RiZTI1ZTJjMDRj
11
+ ODNhMzQzZjZlZDgzNGIwMzAxNjMzY2FiZTRhMzZjZDk5NTRmMTM=
12
12
  data.tar.gz: !binary |-
13
- YzQ0ZTUxYzM2ZmJkODAzOThjMDc4MjkyNzE1NGJlYmI0MGFkMDYzZGJlNWI0
14
- NWRlODlhZjU4NjMzYTlhMDc2ZjFiZjRjODEyNjkwZmM0MDEyOTRmNDU3ODA3
15
- ZDEzNTMzYmEwODYzYTUxM2M4ZDU0YjIzM2ExZDlhOGU3ZmFjMTY=
13
+ OTI5NTczYjUyYTQ5OTU3YjI4MDhiYTZhZjk0NmI2MjkxZTZiMzc0NTA5Mjk2
14
+ YjUwNWY4ZWJlZGIxN2IxMmUxYWMxY2Q4N2E3NDY5MGJhODA2MDc1MTFkMmY3
15
+ OWZkZGU3ZWZhZjY1M2UyZDJjMTBkOWVlOWEzNDIyMDFkNzljNzQ=
@@ -26,6 +26,7 @@ Gem::Specification.new do |s|
26
26
 
27
27
  s.add_runtime_dependency 'selenium-webdriver', '~> 2.32.1'
28
28
  s.add_runtime_dependency 'awesome_print', '~> 1.1.0'
29
+ s.add_runtime_dependency 'json', '~> 1.7.7'
29
30
 
30
31
  s.add_development_dependency 'rake', '~> 10.0.3'
31
32
 
@@ -7,12 +7,6 @@ module Appium::Android
7
7
  button(value).click
8
8
  end
9
9
 
10
- # Get the alert message text.
11
- # @return [String]
12
- def alert_text
13
- get_page
14
- end
15
-
16
10
  # Accept the alert.
17
11
  # The last button is considered "accept."
18
12
  # @return [void]
@@ -40,4 +34,4 @@ module Appium::Android
40
34
  def alert_dismiss_text
41
35
  first_button.text
42
36
  end
43
- end # module Appium::Android
37
+ end # module Appium::Android
@@ -80,7 +80,9 @@ the first element that matches.
80
80
  # @param name [String] the name to search for
81
81
  # @return [Element] the first matching element
82
82
  def name name
83
- @driver.find_element :name, name
83
+ # work around https://github.com/appium/appium/issues/543
84
+ # @driver.find_element :name, name
85
+ mobile :find, [ [ [7, name] ] ]
84
86
  end
85
87
 
86
88
  # Return all elements matching name.
@@ -26,18 +26,18 @@ module Appium::Android
26
26
  last_ele :textfield
27
27
  end
28
28
 
29
- # Get the first textfield that matches text.
30
- # @param text [String, Integer] the text to match exactly. If int then the textfield at that index is returned.
29
+ # Get the first textfield that includes text.
30
+ # @param text [String, Integer] the text to search for. If int then the textfield at that index is returned.
31
31
  # @return [Textfield]
32
32
  def textfield text
33
33
  return ele_index :textfield, text if text.is_a? Numeric
34
- find_ele_by_text :textfield, text
34
+ find_ele_by_text_include :textfield, text
35
35
  end
36
36
 
37
- # Get the first textfield that includes text.
38
- # @param text [String] the text the textfield must include
37
+ # Get the first textfield that matches text.
38
+ # @param text [String] the text to match
39
39
  # @return [Textfield]
40
- def textfield_include text
41
- find_ele_by_text_include :textfield, text
40
+ def textfield_exact text
41
+ find_ele_by_text :textfield, text
42
42
  end
43
43
  end # module Appium::Android
@@ -74,6 +74,7 @@ module Appium::Android
74
74
  # label is name
75
75
  obj.merge!( { name: node['label'] } ) if keys.include?('label') && !node['label'].empty?
76
76
  obj.merge!( { class: node['type'] } ) if keys.include?('type') && !obj.empty?
77
+ obj.merge!( { shown: node['shown'] } ) if keys.include?('shown')
77
78
 
78
79
  r.push obj if !obj.empty?
79
80
  run_internal.call node['children'] if keys.include?('children')
@@ -91,7 +92,7 @@ module Appium::Android
91
92
  results.each { |e|
92
93
  no_text = e[:text].nil?
93
94
  no_name = e[:name].nil? || e[:name] == 'null'
94
-
95
+ next unless e[:shown] # skip invisible
95
96
  # Ignore elements with id only.
96
97
  next if no_text && no_name
97
98
 
@@ -109,6 +110,7 @@ module Appium::Android
109
110
  # label is name. default is 'null'
110
111
  # find_element(:link_text, 'Facebook')
111
112
  out += " name: #{e[:name]}\n" unless no_name
113
+ # out += " visible: #{e[:shown]}\n" unless e[:shown].nil?
112
114
  }
113
115
  out
114
116
  end
@@ -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.3.9' unless defined? ::Appium::VERSION
5
- DATE = '2013-05-06' unless defined? ::Appium::DATE
4
+ VERSION = '0.3.10' unless defined? ::Appium::VERSION
5
+ DATE = '2013-05-07' unless defined? ::Appium::DATE
6
6
  end
@@ -1,3 +1,10 @@
1
+ #### v0.3.9 2013-05-06
2
+
3
+ - [3b4fbb4](https://github.com/appium/ruby_lib/commit/3b4fbb4e6957a92ac4236d5666d932ee9da238e7) Release 0.3.9
4
+ - [98b1b1e](https://github.com/appium/ruby_lib/commit/98b1b1e8e0952244c1ca2c8738d7d33af7eb0f68) Fix extra slashes in path
5
+ - [4c43359](https://github.com/appium/ruby_lib/commit/4c433597c4409ab7c89e395297d2a6af3c6c439d) Update release notes
6
+
7
+
1
8
  #### v0.3.8 2013-05-06
2
9
 
3
10
  - [e7bc45f](https://github.com/appium/ruby_lib/commit/e7bc45fd88f026dc51237d767da9f9dfa2e05b56) Release 0.3.8
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.3.9
4
+ version: 0.3.10
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-05-06 00:00:00.000000000 Z
11
+ date: 2013-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.1.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: json
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 1.7.7
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 1.7.7
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rake
43
57
  requirement: !ruby/object:Gem::Requirement