onlyoffice_webdriver_wrapper 0.3.4 → 0.3.5
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,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 330c079d2c339d796d82e107ba37334d20240ede30025e32c0d113f910e5b3c2
|
4
|
+
data.tar.gz: a26e4e28f96fabfb556ae5cb968591a2fb96096b0d8fc7d8db44f47c3ad68e55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ecdcce1acc5850b9f8025d4e2b79d00f36fb5347b1e55f2bfda709d44bf337c05c04048989f4ed35fdde5eaa5cf5026a821165a53a8e86f1b73d4fa3c1421dc
|
7
|
+
data.tar.gz: d7dffb5e28cba23b06e54e9799c1f533ff244eaa36698b000d744a5965fa795ee64fdac43be21da89555e2eba2f5dcb078997c2b3cee61473e727af80922d98b
|
@@ -10,26 +10,23 @@ module OnlyofficeWebdriverWrapper
|
|
10
10
|
nil
|
11
11
|
end
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
# Set style attribute value of element
|
14
|
+
# @param xpath [String] xpath to set
|
15
|
+
# @param attribute [String] style param to set
|
16
|
+
# @param attribute_value [String] attribute value to set
|
17
|
+
# @return [String] result of execution
|
18
18
|
def set_style_attribute(xpath, attribute, attribute_value)
|
19
|
-
execute_javascript("
|
20
|
-
"singleNodeValue.style.#{attribute}=\"#{attribute_value}\"")
|
19
|
+
execute_javascript("#{dom_element_by_xpath(xpath)}.style.#{attribute}=\"#{attribute_value}\"")
|
21
20
|
end
|
22
21
|
|
22
|
+
alias set_style_parameter set_style_attribute
|
23
|
+
|
23
24
|
def set_style_show_by_xpath(xpath, move_to_center = false)
|
24
|
-
xpath =
|
25
|
-
execute_javascript('document.evaluate( \'' + xpath.to_s +
|
26
|
-
'\' ,document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null ).singleNodeValue.style.display = "block";')
|
25
|
+
execute_javascript("#{dom_element_by_xpath(xpath)}.style.display = 'block';")
|
27
26
|
return unless move_to_center
|
28
27
|
|
29
|
-
execute_javascript(
|
30
|
-
|
31
|
-
execute_javascript('document.evaluate( \'' + xpath.to_s +
|
32
|
-
'\' ,document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null ).singleNodeValue.style.top = "260px";')
|
28
|
+
execute_javascript("#{dom_element_by_xpath(xpath)}.style.left = '410px';")
|
29
|
+
execute_javascript("#{dom_element_by_xpath(xpath)}.style.top = '260px';")
|
33
30
|
end
|
34
31
|
end
|
35
32
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onlyoffice_webdriver_wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ONLYOFFICE
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2020-07-
|
14
|
+
date: 2020-07-15 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: headless
|