onlyoffice_webdriver_wrapper 0.6.0 → 0.6.1
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: fd207cfcb5c3d274d1f27c1159f744f0bf6c5c58beaeb5bbb075d168a3082ded
|
4
|
+
data.tar.gz: 1784801d1b15ae594167e1a11902d3308c0683d9fb45d193d3e8033e8f62d807
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 424d71030c12a0ab537b5c5c0bbb44daabb7ec7a5db7b318a97a7d2b034c0d59de67d957417add165e8af151b9cc9bf372cfe640b2a6ebdb36d6abeeb9b81537
|
7
|
+
data.tar.gz: 1b179181f58eab37e9f982e9134679e724d2c0a328c51511d137336ff10260fac2ad2b1c3bcba83d0278bc8d1fba30198392af3c817c4d93345bc894b0f206bb
|
@@ -21,8 +21,8 @@ module OnlyofficeWebdriverWrapper
|
|
21
21
|
# @return [True, False] is video should be recorded
|
22
22
|
attr_reader :record_video
|
23
23
|
|
24
|
-
def initialize(resolution_x
|
25
|
-
resolution_y
|
24
|
+
def initialize(resolution_x: 1680,
|
25
|
+
resolution_y: 1050,
|
26
26
|
record_video: true)
|
27
27
|
@resolution_x = resolution_x
|
28
28
|
@resolution_y = resolution_y
|
@@ -56,20 +56,20 @@ module OnlyofficeWebdriverWrapper
|
|
56
56
|
attr_accessor :headless
|
57
57
|
# @return [Net::HTTP::Proxy] connection proxy
|
58
58
|
attr_accessor :proxy
|
59
|
+
# @return [True, False] should video be recorded
|
60
|
+
attr_reader :record_video
|
59
61
|
|
60
|
-
def initialize(browser = :firefox,
|
61
|
-
_remote_server = nil,
|
62
|
-
device: :desktop_linux,
|
63
|
-
proxy: nil)
|
62
|
+
def initialize(browser = :firefox, params = {})
|
64
63
|
raise WebdriverSystemNotSupported, 'Your OS is not 64 bit. It is not supported' unless os_64_bit?
|
65
64
|
|
66
|
-
@device = device
|
67
|
-
@
|
65
|
+
@device = params.fetch(:device, :desktop_linux)
|
66
|
+
@record_video = params.fetch(:record_video, true)
|
67
|
+
@headless = HeadlessHelper.new(record_video: record_video)
|
68
68
|
@headless.start
|
69
69
|
|
70
70
|
@download_directory = Dir.mktmpdir('webdriver-download')
|
71
|
-
@browser = browser
|
72
|
-
@proxy = proxy
|
71
|
+
@browser = params.fetch(:browser, browser)
|
72
|
+
@proxy = params[:proxy]
|
73
73
|
case browser
|
74
74
|
when :firefox
|
75
75
|
@driver = start_firefox_driver
|