superbot 0.1.4.rc1 → 0.1.4.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/superbot/capybara/convert.rb +2 -0
- data/lib/superbot/capybara/runner.rb +2 -5
- data/lib/superbot/version.rb +1 -1
- data/superbot.gemspec +1 -1
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1641f7b484bb325fb0f42f9e9b8edd5772ca03c6668190d15aad7f8d050a5b2e
|
4
|
+
data.tar.gz: a98fda3df485173a91af53d806b1bc25886318acd3325d131b9b55283a160bf3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b67811f1460990d60c78e0e82b1c5da32ddec164227ea2a8d0acd6bec9bb241cf8a41254abfbe57ed743e019515a07ef88ea26d459fbf12a73f2ca5a2f6d1119
|
7
|
+
data.tar.gz: 9ac5fc57b351326bb58f6e990a1893d109c89af894fb792698b090b15a070b80a97da3473700fd65eeb6f4dbf75205cd13f906d04691e8ec0cd4580032c63008
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
superbot (0.1.4.
|
4
|
+
superbot (0.1.4.rc2)
|
5
5
|
clamp (= 1.2.1)
|
6
|
+
kommando (~> 0.1)
|
6
7
|
launchy (= 2.4.3)
|
7
8
|
sinatra (= 2.0.3)
|
8
9
|
sinatra-silent (= 0.0.1)
|
@@ -154,7 +155,6 @@ DEPENDENCIES
|
|
154
155
|
guard (~> 2.14)
|
155
156
|
guard-rspec (~> 4.7)
|
156
157
|
guard-rubocop (~> 1.3)
|
157
|
-
kommando (~> 0.1)
|
158
158
|
parallel_tests (~> 2.22)
|
159
159
|
rake (~> 10.0)
|
160
160
|
rspec (~> 3.0)
|
@@ -164,4 +164,4 @@ DEPENDENCIES
|
|
164
164
|
superbot-capybara (~> 360.0, >= 360.0.0)
|
165
165
|
|
166
166
|
BUNDLED WITH
|
167
|
-
1.16.
|
167
|
+
1.16.6
|
@@ -27,6 +27,8 @@ module Superbot
|
|
27
27
|
"page.execute_script('window.scrollBy(0,' + (page.execute_script('return document.body.scrollHeight') * #{action[:amountPercent]} / 100).to_s + ')')"
|
28
28
|
when 'resolution' then "page.driver.browser.manage.window.resize_to(#{action[:resolution].join(',')})"
|
29
29
|
when 'has-text' then "page.assert_text('#{action[:text]}')"
|
30
|
+
when 'input' then "find('#{action[:selector]}', match: :first).set('#{action[:value]}')"
|
31
|
+
when 'key-press' then "page.driver.browser.action.send_keys(#{action[:keys].map { |k| k.delete(':').to_sym if k.length > 1 }}).perform"
|
30
32
|
end
|
31
33
|
end
|
32
34
|
|
@@ -14,10 +14,6 @@ module Superbot
|
|
14
14
|
runner.in.writeln({ eval: script }.to_json)
|
15
15
|
end
|
16
16
|
|
17
|
-
def rerun(script)
|
18
|
-
runner.in.writeln({ eval: script }.to_json)
|
19
|
-
end
|
20
|
-
|
21
17
|
def kill_session
|
22
18
|
runner&.kill
|
23
19
|
rescue Timeout::Error
|
@@ -48,7 +44,8 @@ module Superbot
|
|
48
44
|
parsed_error = JSON.parse(runner.out.lines.last, symbolize_names: true)
|
49
45
|
puts "Test failed: #{parsed_error[:message]}"
|
50
46
|
@finished = true
|
51
|
-
|
47
|
+
|
48
|
+
if parsed_error[:class].match?(/Selenium::WebDriver::Error::(WebDriverError|NoSuchWindowError)/)
|
52
49
|
kill_session
|
53
50
|
puts "", "ERROR: Seems like browser session has been closed, try to run test again to create new session"
|
54
51
|
end
|
data/lib/superbot/version.rb
CHANGED
data/superbot.gemspec
CHANGED
@@ -37,11 +37,11 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.add_runtime_dependency "sinatra", "2.0.3"
|
38
38
|
spec.add_runtime_dependency "launchy", "2.4.3"
|
39
39
|
spec.add_runtime_dependency "sinatra-silent", "0.0.1"
|
40
|
+
spec.add_runtime_dependency "kommando", "~> 0.1"
|
40
41
|
|
41
42
|
spec.add_development_dependency "bundler", "~> 1.16"
|
42
43
|
spec.add_development_dependency "rake", "~> 10.0"
|
43
44
|
spec.add_development_dependency "rspec", "~> 3.0"
|
44
|
-
spec.add_development_dependency "kommando", "~> 0.1"
|
45
45
|
spec.add_development_dependency "rubocop", "~> 0.53"
|
46
46
|
spec.add_development_dependency "simplecov", "~> 0.16"
|
47
47
|
spec.add_development_dependency "parallel_tests", "~> 2.22"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: superbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.4.
|
4
|
+
version: 0.1.4.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Superbots
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|
@@ -81,61 +81,61 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 0.0.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: kommando
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '1
|
90
|
-
type: :
|
89
|
+
version: '0.1'
|
90
|
+
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '1
|
96
|
+
version: '0.1'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: bundler
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '1.16'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '1.16'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: rake
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '10.0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '10.0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: rspec
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '0
|
131
|
+
version: '3.0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '0
|
138
|
+
version: '3.0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: rubocop
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|