locution-sdk 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/locution/sdk/listener.rb +19 -0
- data/lib/locution/sdk/version.rb +1 -1
- 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: 35982215b4df281bb563b5a7750409df099ba3ff
|
4
|
+
data.tar.gz: a1069adf0f139f8852fba46894bf27009c7d2a03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84d1389cfbb4a9b785cdf5ddf9098ab777855a61756c5463b38a8fcc8a6eabf56fd294633963aaa5344dd6389250b12fe135f4e9130ba8fbaf7a598e43b5b9e6
|
7
|
+
data.tar.gz: fde1775dcad4878ee0a344c3190762973640baf8dd0fe6f002186822ef5a692c300e6b2f1620fbbc9a88b7cca725a87658eed7fbd29a82a2573cd673665558ea
|
@@ -17,11 +17,13 @@ module Locution
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def before_find(by, what, driver)
|
20
|
+
@ignore_javascript_inspection = true
|
20
21
|
@number_of_elements_found = driver.execute_script("return #{get_javascript(by, what)}")
|
21
22
|
@locator_start_time = Time.now
|
22
23
|
end
|
23
24
|
|
24
25
|
def after_find(by, what, driver)
|
26
|
+
@ignore_javascript_inspection = false
|
25
27
|
::RestClient.post "#{@base_url}/tests/#{@test_id}/locators", {
|
26
28
|
access_token: @access_token,
|
27
29
|
locator_value: "#{by}, #{what}",
|
@@ -31,6 +33,23 @@ module Locution
|
|
31
33
|
}
|
32
34
|
end
|
33
35
|
|
36
|
+
def before_execute_script(script, driver)
|
37
|
+
unless @ignore_javascript_inspection
|
38
|
+
@locator_start_time = Time.now
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def after_execute_script(script, driver)
|
43
|
+
unless @ignore_javascript_inspection
|
44
|
+
::RestClient.post "#{@base_url}/tests/#{@test_id}/locators", {
|
45
|
+
access_token: @access_token,
|
46
|
+
locator_value: "execute script, #{script}",
|
47
|
+
start_time: @locator_start_time,
|
48
|
+
end_time: Time.now
|
49
|
+
}
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
34
53
|
def after_quit(driver)
|
35
54
|
::RestClient.put "#{@base_url}/tests/#{@test_id}", {
|
36
55
|
access_token: @access_token,
|
data/lib/locution/sdk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: locution-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Haeffner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|