appium_lib 0.0.28 → 0.0.29

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZWUwOTFmNDhjOWQ4YzBhYTVhZmQ4N2YyZDUxZWUyYmE4YTk1ZmY5OQ==
4
+ ZDQ1NWMzZmUyMDQzYzRlNWQ0YzhjMTU0ZjJiMWRmZGQ2YmNlYmQwMQ==
5
5
  data.tar.gz: !binary |-
6
- ZGU2MjI1OWE0M2JjNDZjNzRhYzBiNGE0NWYyYjhlYmViMGI4NjQwMQ==
6
+ ZjljNzc4ZmI1MjBlYWZkMjUwMjU3MDlmYTYzNTZmNTg5MDE2NjY1Yg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MTM0NzQxNzdkNjc3YzhlMDJmMTEzNTViNzRmN2ZhNjFmMThhMGMzNzhmNGVk
10
- NWRiMTg4M2IyZTE5ZWM1ZDdlM2NkNTEzMTJlMWVhYTU0OTczNDU4NDEyZGRk
11
- MjVjYzY0M2ViYjg2MThkNGVmOTJlNjQxMDI0MDYwYjAwNmM4MmQ=
9
+ NWU4MWIxOWJkN2IyNGJlOTQwZmIxMDMwNDViYzk3NGE1MWMzNDE4ZmZlNDc2
10
+ ZWY5NDFkZGJhMzY1ZjM3MjliZjFmNGViZTZjNTMwN2VjZTUwNTIzYzY1NGZh
11
+ NGRlY2JlZWE5OGM4ZTYzMmZhZjE0NzM1NGViMWRkZTUzMzI5ZjA=
12
12
  data.tar.gz: !binary |-
13
- MzYyNTk0NmMwMDlmYmEzM2RjN2Q0MzMwNDQ2ZDM5MTU5MTlmYzgwMzY0MWEw
14
- NmY5NzA4OWYzYTAyMGVhMDBkMzYzNDJhMDFhYzIwYTI0OWI5Nzc3YzRiMjNj
15
- YWU1ZmI3ZWUzZWJkOGY3MWUwMjRlZDhkZTRlZWViNjZiNDY3MjI=
13
+ ZGRmM2IwYTkwYTk0MTE2NjRjM2ZkZThkZDU5OWVlNWM0NDM2YWEwZTA3ODE1
14
+ MmY3OWIxOGI1YjQ3ZDdhZTBjZTc5OGJmMzM0YTY4MjA2YTNjZWIzNTc2YzVh
15
+ NWVlMmJkMTZkY2EzMmM3NmM4MTNjNmMwZDhjOTA5OTQ2Mzk4YjA=
data/Rakefile CHANGED
@@ -4,6 +4,7 @@ require 'date'
4
4
 
5
5
  # Defines gem name.
6
6
  def repo_name; 'appium_lib'; end # ruby_lib published as appium_lib
7
+ def gh_name; 'ruby_lib'; end # the name as used on github.com
7
8
  def version_file; "lib/#{repo_name}/version.rb"; end
8
9
  def version_rgx; /VERSION = '([^']+)'/m; end
9
10
 
@@ -52,12 +53,13 @@ task :release => :gem do
52
53
  exit!
53
54
  end
54
55
 
55
- Rake::Task['notes'].execute
56
-
57
56
  # Commit then pull before pushing.
58
57
  sh "git commit --allow-empty -am 'Release #{version}'"
59
58
  sh 'git pull'
60
59
  sh "git tag v#{version}"
60
+ # update notes now that there's a new tag
61
+ Rake::Task['notes'].execute
62
+ sh "git commit --allow-empty -am 'Update release notes'"
61
63
  sh 'git push origin master'
62
64
  sh "git push origin v#{version}"
63
65
  sh "gem push #{repo_name}-#{version}.gem"
@@ -79,8 +81,8 @@ end
79
81
 
80
82
  desc 'Install gem'
81
83
  task :install => :gem do
82
- `gem uninstall -aIx #{repo_name}`
83
- sh "gem install --no-rdoc --no-ri #{repo_name}-#{version}.gem"
84
+ `gem uninstall -aIx #{repo_name}`
85
+ sh "gem install --no-rdoc --no-ri #{repo_name}-#{version}.gem"
84
86
  end
85
87
 
86
88
  desc 'Update release notes'
@@ -112,7 +114,7 @@ task :notes do
112
114
  data.split("\n").each do |line|
113
115
  hex = line.match(/[a-zA-Z0-9]+/)[0];
114
116
  # use first 7 chars to match GitHub
115
- new_data += "- [#{hex[0...7]}](https://github.com/appium/ruby_lib/commit/#{hex}) #{line.gsub(hex, '').strip}\n"
117
+ new_data += "- [#{hex[0...7]}](https://github.com/appium/#{gh_name}/commit/#{hex}) #{line.gsub(hex, '').strip}\n"
116
118
  end
117
119
  data = new_data + "\n"
118
120
 
data/appium_lib.gemspec CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  s.homepage = 'https://github.com/appium/ruby_lib' # published as appium_lib
25
25
  s.require_paths = [ 'lib' ]
26
26
 
27
- s.add_runtime_dependency 'selenium-webdriver', '~> 2.32.0'
27
+ s.add_runtime_dependency 'selenium-webdriver', '~> 2.32.1'
28
28
  s.add_runtime_dependency 'awesome_print', '~> 1.1.0'
29
29
 
30
30
  s.add_development_dependency 'rake', '~> 10.0.3'
@@ -72,9 +72,6 @@ else
72
72
  require 'android/generic'
73
73
  end
74
74
 
75
- # implicit_wait default_wait
76
- $default_wait = 30
77
-
78
75
  # WebDriver capabilities. Must be valid for Sauce to work.
79
76
  # https://github.com/jlipps/appium/blob/master/app/android.js
80
77
  def android_capabilities
@@ -140,10 +137,12 @@ end
140
137
 
141
138
  # Creates a new global driver and quits the old one if it exists.
142
139
  # @return [Selenium::WebDriver] the new global driver
143
- def start_driver
140
+ def start_driver wait=30
144
141
  @client = @client || Selenium::WebDriver::Remote::Http::Default.new
145
142
  @client.timeout = 999999
146
143
 
144
+ $default_wait = wait
145
+
147
146
  # If the driver already exists, quit before creating a new driver.
148
147
  driver_quit
149
148
 
@@ -42,10 +42,16 @@ def textfield text
42
42
  return execute_script(js).first
43
43
  end
44
44
 
45
- # find_ele_by_text :textfield, text
45
+ textfield_include text
46
+ end
47
+
48
+ # Get the first textfield that includes text.
49
+ # @param text [String] the text the textfield must include
50
+ # @return [Textfield]
51
+ def textfield_include text
46
52
  js = %Q(
47
- var t = au.getElementsByXpath('textfield[@text="#{text}"]').value;
48
- var s = au.getElementsByXpath('secure[@text="#{text}"]').value;
53
+ var t = au.getElementsByXpath('textfield[contains(@text, "#{text}")]').value;
54
+ var s = au.getElementsByXpath('secure[contains(@text, "#{text}")]').value;
49
55
  t.concat(s)[0];
50
56
  )
51
57
 
@@ -54,13 +60,14 @@ def textfield text
54
60
  execute_script js
55
61
  end
56
62
 
57
- # Get the first textfield that includes text.
58
- # @param text [String] the text the textfield must include
63
+ # Get the first textfield that exactly matches text.
64
+ # @param text [String] the text the textfield must exactly match
59
65
  # @return [Textfield]
60
- def textfield_include text
66
+ def textfield_exact text
67
+ # find_ele_by_text :textfield, text
61
68
  js = %Q(
62
- var t = au.getElementsByXpath('textfield[contains(@text, "#{text}")]').value;
63
- var s = au.getElementsByXpath('secure[contains(@text, "#{text}")]').value;
69
+ var t = au.getElementsByXpath('textfield[@text="#{text}"]').value;
70
+ var s = au.getElementsByXpath('secure[@text="#{text}"]').value;
64
71
  t.concat(s)[0];
65
72
  )
66
73
 
@@ -1,4 +1,4 @@
1
1
  module AppiumLib
2
- VERSION = '0.0.28' unless defined? ::AppiumLib::VERSION
3
- DATE = '2013-04-11' unless defined? ::AppiumLib::DATE
2
+ VERSION = '0.0.29' unless defined? ::AppiumLib::VERSION
3
+ DATE = '2013-04-15' unless defined? ::AppiumLib::DATE
4
4
  end
data/release_notes.md CHANGED
@@ -1,3 +1,31 @@
1
+ #### v0.0.28 2013-04-11
2
+
3
+ - [70606a4](https://github.com/appium/ruby_lib/commit/70606a43cebcd0c19b98a1876fb929f03db7bb0e) Release 0.0.28
4
+ - [61d1943](https://github.com/appium/ruby_lib/commit/61d19439c8597ca3562028d6c985370a5d43fa26) Update docs.md
5
+ - [7676a90](https://github.com/appium/ruby_lib/commit/7676a90af8a1951817fcc8c49ddef46577cf5726) Add iOS name, names, text, texts
6
+ - [7bc936c](https://github.com/appium/ruby_lib/commit/7bc936c63fff14780595a9a9fd360670d6e00178) Update webdriver
7
+ - [e3646d3](https://github.com/appium/ruby_lib/commit/e3646d311873f82287e2a14a8c699c2d097c5a6c) Add fast_duration
8
+ - [22ac58a](https://github.com/appium/ruby_lib/commit/22ac58ab3f48cc51019fafde19efdc012d5b8c2b) Check that app path exists
9
+ - [217bca9](https://github.com/appium/ruby_lib/commit/217bca9e85c5e5e4a21832c34cc715476b0dd181) Add page for iOS
10
+ - [2abf365](https://github.com/appium/ruby_lib/commit/2abf365017555c37e95cfa57f0142b0a2fa944a8) Update docs.md
11
+ - [a1d26ff](https://github.com/appium/ruby_lib/commit/a1d26ff13912e301079cc8ca222013850b660d21) Add link to docs.md
12
+ - [e4d27c9](https://github.com/appium/ruby_lib/commit/e4d27c95e344ca7b25512044b65cbdbe4a9dce82) Update docs.md
13
+ - [2cf20a0](https://github.com/appium/ruby_lib/commit/2cf20a026ef33e727b1da360634668ddda70518d) Create docs.md
14
+ - [e1f470e](https://github.com/appium/ruby_lib/commit/e1f470e0a2b9a6cf94ffa20edbc244e31c0375e8) Add find for Android
15
+ - [37bb4e9](https://github.com/appium/ruby_lib/commit/37bb4e90b29e5adb4438b287b6387a504c94b5c4) Update comment
16
+ - [aaeba81](https://github.com/appium/ruby_lib/commit/aaeba817376dd8e3cadeab37d096abc0170b565b) Add order to find
17
+ - [73b757c](https://github.com/appium/ruby_lib/commit/73b757cd28c5bc85b98d6e747f79f7ee33af5022) Define find and finds to search everything
18
+ - [ebd6c1b](https://github.com/appium/ruby_lib/commit/ebd6c1bc7d3f8be01fdf5346786c2b5fb2da8deb) Fix text and texts on iOS
19
+
20
+
21
+ #### v0.0.27 2013-04-05
22
+
23
+ - [fb4af20](https://github.com/appium/ruby_lib/commit/fb4af206c114cf8f75fcb41cdbbea0ba728bf7e6) Release 0.0.27
24
+ - [ca00d82](https://github.com/appium/ruby_lib/commit/ca00d82fb8e716d5941ec0ee6b38b207329b915e) Fix require
25
+ - [ad00639](https://github.com/appium/ruby_lib/commit/ad006393ce8b6dc071c98b2edf73c32707d37762) Update readme.md
26
+ - [80027ba](https://github.com/appium/ruby_lib/commit/80027ba6caca5d79345a9abf8cf1b8b9573fad9d) Update release notes
27
+
28
+
1
29
  #### v0.0.26 2013-04-04
2
30
 
3
31
  - [07fed25](https://github.com/appium/ruby_lib/commit/07fed259a743d9f3f3d72bfc8c8b9eac7b26d724) Release 0.0.26
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.0.28
4
+ version: 0.0.29
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-04-11 00:00:00.000000000 Z
11
+ date: 2013-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: 2.32.0
19
+ version: 2.32.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: 2.32.0
26
+ version: 2.32.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: awesome_print
29
29
  requirement: !ruby/object:Gem::Requirement