appium_capybara 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/contributing.md +1 -0
- data/example/readme.md +22 -1
- data/lib/appium_capybara/driver/appium/node.rb +1 -41
- data/lib/appium_capybara/version.rb +2 -2
- data/release_notes.md +9 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 846f78572050e712ef82ddef04af327ed4597b4b
|
4
|
+
data.tar.gz: d1f06c86e52c34181b78cda44e73bf87cb7c506e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d01de1de84dc2daccafee922af40054f439042b6714d7411b6893da3e6895949445df8e8d5860399018cfcf95a46d180017e24bcc4dd2b5e042e2f9b5b454444
|
7
|
+
data.tar.gz: 3792e906a0fcd4ccbc3015a2a896b3d7b1b6d8f675adcd3ecb7d75389a0e0eb31a23401360cf921462160aef495c6a1e0a8c518158fd1109818e089d36a6ed4c
|
data/contributing.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
appium_capybara strives to follow the [GitHub Ruby style guide](https://github.com/styleguide/ruby)
|
data/example/readme.md
CHANGED
@@ -1,8 +1,29 @@
|
|
1
1
|
# Run the sample
|
2
2
|
|
3
|
-
|
4
3
|
```
|
5
4
|
cd example
|
6
5
|
bundle update
|
7
6
|
rspec
|
8
7
|
```
|
8
|
+
|
9
|
+
# Use with pry
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
# start a Pry session and paste the following code
|
13
|
+
# run from the example folder
|
14
|
+
require 'appium_capybara'
|
15
|
+
|
16
|
+
Capybara.register_driver(:appium) do |app|
|
17
|
+
opts = Appium.load_appium_txt file: File.join(Dir.pwd, 'appium.txt')
|
18
|
+
Appium::Capybara::Driver.new app, opts
|
19
|
+
end
|
20
|
+
|
21
|
+
Capybara.default_driver = :appium
|
22
|
+
|
23
|
+
capy_driver = Capybara.current_session.driver
|
24
|
+
capy_driver.browser
|
25
|
+
|
26
|
+
# now driver commands can be invoked
|
27
|
+
> capy_driver.go_back
|
28
|
+
post /back
|
29
|
+
```
|
@@ -1,11 +1,5 @@
|
|
1
1
|
module Appium::Capybara
|
2
|
-
class Appium::Capybara::Node < Capybara::
|
3
|
-
def [](name)
|
4
|
-
native.attribute(name.to_s)
|
5
|
-
rescue Selenium::WebDriver::Error::WebDriverError
|
6
|
-
nil
|
7
|
-
end
|
8
|
-
|
2
|
+
class Appium::Capybara::Node < Capybara::Selenium::Node
|
9
3
|
def value
|
10
4
|
native.value
|
11
5
|
end
|
@@ -27,50 +21,16 @@ module Appium::Capybara
|
|
27
21
|
native.send_keys(value.to_s)
|
28
22
|
end
|
29
23
|
|
30
|
-
def click
|
31
|
-
native.click
|
32
|
-
end
|
33
|
-
|
34
24
|
def long_press
|
35
25
|
action = Appium::TouchAction.new
|
36
26
|
action.long_press(element: native, duration: 2000)
|
37
27
|
action.perform
|
38
28
|
end
|
39
29
|
|
40
|
-
def tag_name
|
41
|
-
native.tag_name
|
42
|
-
end
|
43
|
-
|
44
|
-
def visible?
|
45
|
-
displayed = native.displayed?
|
46
|
-
displayed && displayed != "false"
|
47
|
-
end
|
48
|
-
|
49
|
-
def selected?
|
50
|
-
selected = native.selected?
|
51
|
-
selected && selected != "false"
|
52
|
-
end
|
53
|
-
|
54
|
-
def disabled?
|
55
|
-
!native.enabled?
|
56
|
-
end
|
57
|
-
|
58
|
-
def find_xpath(locator)
|
59
|
-
native.find_elements(:xpath, locator).map { |n| self.class.new(driver, n) }
|
60
|
-
end
|
61
|
-
|
62
|
-
def find_css(locator)
|
63
|
-
native.find_elements(:css, locator).map { |n| self.class.new(driver, n) }
|
64
|
-
end
|
65
|
-
|
66
30
|
def find_custom(finder, locator)
|
67
31
|
native.find_elements(finder, locator).map { |n| self.class.new(driver, n) }
|
68
32
|
end
|
69
33
|
|
70
|
-
def ==(other)
|
71
|
-
native == other.native
|
72
|
-
end
|
73
|
-
|
74
34
|
def inspect
|
75
35
|
%(#<#{self.class} name="#{name}">)
|
76
36
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Appium
|
2
2
|
module Capybara
|
3
|
-
VERSION = '1.
|
4
|
-
DATE = '2014-
|
3
|
+
VERSION = '1.1.0' unless defined? ::Appium::Capybara::VERSION
|
4
|
+
DATE = '2014-10-02' unless defined? ::Appium::Capybara::DATE
|
5
5
|
end
|
6
6
|
end
|
data/release_notes.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
#### v1.1.0 2014-10-02
|
2
|
+
|
3
|
+
- [88f6b44](https://github.com/appium/appium_capybara/commit/88f6b441e7e3da381a4d48b852bf5b00b04f6a7e) Release 1.1.0
|
4
|
+
- [b1decb5](https://github.com/appium/appium_capybara/commit/b1decb5d14a4a26ece6e857fb0a8430e8d4db5a4) Merge pull request #17 from appium/inherit_selenium_node
|
5
|
+
- [96c72dd](https://github.com/appium/appium_capybara/commit/96c72dd91f23e138be32bcf98bc7e2b9b17a2a6c) Change appium node to inherit from selenium
|
6
|
+
- [a5c95e5](https://github.com/appium/appium_capybara/commit/a5c95e5b8e238d5305fae11db6a9e9982fcb4e6a) Create contributing.md
|
7
|
+
- [05b7275](https://github.com/appium/appium_capybara/commit/05b72756d0eadcac195c32221406ed651ac2de0d) Document how to use with Pry
|
8
|
+
|
9
|
+
|
1
10
|
#### v1.0.0 2014-09-17
|
2
11
|
|
3
12
|
- [63e9f31](https://github.com/appium/appium_capybara/commit/63e9f319906f2ce7cda0fde8a2fc00363c7d890b) Release 1.0.0
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appium_capybara
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- scott.bonebrake@gmail.com
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-10-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: appium_lib
|
@@ -85,6 +85,7 @@ files:
|
|
85
85
|
- README.md
|
86
86
|
- Thorfile
|
87
87
|
- appium_capybara.gemspec
|
88
|
+
- contributing.md
|
88
89
|
- example/Gemfile
|
89
90
|
- example/appium.txt
|
90
91
|
- example/readme.md
|