appium_lib 0.14.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/appium_lib/common/helper.rb +4 -20
- data/lib/appium_lib/common/version.rb +2 -2
- data/lib/appium_lib/driver.rb +5 -3
- data/release_notes.md +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc0fd27db21aecf1da1b2885327aee6fab7cc21e
|
4
|
+
data.tar.gz: 0e541e74c1bd108c6ebc6eff88aeb93ea94adf23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d64918287c15449fd1aced0f9759eeb8835ce9d50f57c912c8f58ee9ea8e550ec7d9ee1bcdf0baf141dd709c945768de2ce1881b24416ecd77922c92e5be9cb
|
7
|
+
data.tar.gz: d2b309aa7f642dac1065a52e55d191ce404300dd81935917e67575b0e6cefe1e3ec710742a1bef5a4181683ccc08f1579c259ab63db02ea653eaab02ce87aabd
|
@@ -30,16 +30,8 @@ module Appium::Common
|
|
30
30
|
# @param interval [Float] the time in seconds to wait after calling the block
|
31
31
|
# @param block [Block] the block to call
|
32
32
|
# @return [Object] the result of block.call
|
33
|
-
def wait max_wait
|
34
|
-
if max_wait
|
35
|
-
max_wait = begin
|
36
|
-
$driver.default_wait
|
37
|
-
rescue
|
38
|
-
end
|
39
|
-
max_wait ||= 30
|
40
|
-
end
|
41
|
-
|
42
|
-
# Rescue Timeout::Error: execution expired
|
33
|
+
def wait max_wait=30, interval=0.5, &block
|
34
|
+
max_wait = 1 if max_wait <= 0
|
43
35
|
result = nil
|
44
36
|
timeout max_wait do
|
45
37
|
until (result = begin; block.call || true; rescue; end)
|
@@ -60,16 +52,8 @@ module Appium::Common
|
|
60
52
|
# @param interval [Float] the time in seconds to wait after calling the block
|
61
53
|
# @param block [Block] the block to call
|
62
54
|
# @return [Object] the result of block.call
|
63
|
-
def wait_true max_wait
|
64
|
-
if max_wait
|
65
|
-
max_wait = begin
|
66
|
-
$driver.default_wait
|
67
|
-
rescue
|
68
|
-
end
|
69
|
-
max_wait ||= 30
|
70
|
-
end
|
71
|
-
|
72
|
-
# Rescue Timeout::Error: execution expired
|
55
|
+
def wait_true max_wait=30, interval=0.5, &block
|
56
|
+
max_wait = 1 if max_wait <= 0
|
73
57
|
result = nil
|
74
58
|
timeout max_wait do
|
75
59
|
until (result = begin; block.call; rescue; 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.
|
5
|
-
DATE = '2013-11-
|
4
|
+
VERSION = '0.15.0' unless defined? ::Appium::VERSION
|
5
|
+
DATE = '2013-11-25' unless defined? ::Appium::DATE
|
6
6
|
end
|
data/lib/appium_lib/driver.rb
CHANGED
@@ -552,8 +552,10 @@ module Appium
|
|
552
552
|
# @param search_block [Block] the block to call
|
553
553
|
# @return [Boolean]
|
554
554
|
def exists pre_check=0, post_check=@default_wait, &search_block
|
555
|
-
|
556
|
-
|
555
|
+
# do not uset set_wait here.
|
556
|
+
# it will cause problems with other methods reading the default_wait of 0
|
557
|
+
# which then gets converted to a 1 second wait.
|
558
|
+
@driver.manage.timeouts.implicit_wait = pre_check
|
557
559
|
# the element exists unless an error is raised.
|
558
560
|
exists = true
|
559
561
|
|
@@ -564,7 +566,7 @@ module Appium
|
|
564
566
|
end
|
565
567
|
|
566
568
|
# restore wait
|
567
|
-
|
569
|
+
@driver.manage.timeouts.implicit_wait = post_check if post_check != pre_check
|
568
570
|
|
569
571
|
exists
|
570
572
|
end
|
data/release_notes.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
#### v0.14.0 2013-11-22
|
2
|
+
|
3
|
+
- [e7ed56b](https://github.com/appium/ruby_lib/commit/e7ed56b6304d7c9f6a24384915def1a3bc732c4e) Release 0.14.0
|
4
|
+
- [eea5ef1](https://github.com/appium/ruby_lib/commit/eea5ef19bd7d52aac24e55e76544980b8c144a84) set_wait remembers the second to last wait
|
5
|
+
- [7ef3406](https://github.com/appium/ruby_lib/commit/7ef34065982f4832584b12174fd491d5e1919c9b) Release 0.13.0
|
6
|
+
- [e1632bc](https://github.com/appium/ruby_lib/commit/e1632bc88116996a5ed3983a0a9f3ec864d229d9) Release 0.13.0
|
7
|
+
- [87c5e12](https://github.com/appium/ruby_lib/commit/87c5e120c51e3344241ca48ccb4ba4990dc76cbd) Release 0.13.0
|
8
|
+
- [647cb94](https://github.com/appium/ruby_lib/commit/647cb942f344c635e067f2ae563f4fae12685148) Release 0.13.0
|
9
|
+
|
10
|
+
|
1
11
|
#### v0.13.0 2013-11-22
|
2
12
|
|
3
13
|
- [e1632bc](https://github.com/appium/ruby_lib/commit/e1632bc88116996a5ed3983a0a9f3ec864d229d9) Release 0.13.0
|
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.
|
4
|
+
version: 0.15.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-11-
|
11
|
+
date: 2013-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|