grabzit 3.5.6 → 3.5.7

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: e1484676d666a8e9cae4448b2005b1be6d9b4f42b2d07d63e127aef3dabe2fa4
4
- data.tar.gz: 39e284516c8cb45281b35c23ef488aa3047c1e8939db8313ccf276f703c28c9b
3
+ metadata.gz: 16c7cc39035594b8b6106c9c4441c2eb5a00ea16db85217d8d72ea20263c21db
4
+ data.tar.gz: 2130af1361b55d3c3f31ecb451e9cf076b05a1c98e296a6c900599da33fc93d4
5
5
  SHA512:
6
- metadata.gz: da6ef1b151e29232c53449fce8c6110f43883f32c5c00729362df5f8005015cbb66d9dae3417252356ed859d823bbc520d32aa9bf40bbced2f23b949fec83c42
7
- data.tar.gz: 7bbf2210b6aad5b1ecfd75baab699e49277bd7ffad0da1b900eff4d5bac838f3fe384bfa72798fdab2b8c6f725d0979a80dd8f22b409cb46f089d593911f23fe
6
+ metadata.gz: e99264eb4a5e8178ab936d5ad0e8dfcbc9724403bdfb26079f93bc5809c97c11f39434b14c8766864f7987e90b0166381ea6431850fcd1c962ca7593c6332d9c
7
+ data.tar.gz: 1a0a82fc0d2de5323e9f3f1fd3aa46d0eb30dba1b87c98f45823ac1ad38c17a6a383a2c57c4ff7c3f1327acc490b0f7298b5673412713192ae9700441aa36087
@@ -34,6 +34,8 @@ module GrabzIt
34
34
  @password = nil
35
35
  @clickElement = nil
36
36
  @jsCode = nil
37
+ @scrollElement = nil
38
+ @hoverElement = nil
37
39
  end
38
40
 
39
41
  # @return [Boolean] true if the background images of the web page should be included in the DOCX
@@ -310,6 +312,32 @@ module GrabzIt
310
312
  def clickElement=(value)
311
313
  @clickElement = value
312
314
  end
315
+
316
+ # @return [String] get the CSS selector of the HTML element in the web page that must scroll to before the capture is performed
317
+ def scrollElement
318
+ @scrollElement
319
+ end
320
+
321
+ # Set the CSS selector of the HTML element in the web page that must scroll to before the capture is performed
322
+ #
323
+ # @param value [String] the element to scroll to
324
+ # @return [void]
325
+ def scrollElement=(value)
326
+ @scrollElement = value
327
+ end
328
+
329
+ # @return [String] get the CSS selector of the HTML element in the web page that must hovered over before the capture is performed
330
+ def hoverElement
331
+ @hoverElement
332
+ end
333
+
334
+ # Set the CSS selector of the HTML element in the web page that must hovered over before the capture is performed
335
+ #
336
+ # @param value [String] the element to hover over
337
+ # @return [void]
338
+ def hoverElement=(value)
339
+ @hoverElement = value
340
+ end
313
341
 
314
342
  # @return [String] get the ID of a capture that should be merged at the beginning of the new DOCX document
315
343
  def mergeId
@@ -415,7 +443,7 @@ module GrabzIt
415
443
  items.push(GrabzIt::Utility.nil_check(url))
416
444
  end
417
445
 
418
- items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.b_to_str(@includeBackground),@pagesize ,@orientation,GrabzIt::Utility.b_to_str(@includeImages),GrabzIt::Utility.b_to_str(@includeLinks),GrabzIt::Utility.nil_check(@title),GrabzIt::Utility.nil_int_check(@marginTop),GrabzIt::Utility.nil_int_check(@marginLeft),GrabzIt::Utility.nil_int_check(@marginBottom),GrabzIt::Utility.nil_int_check(@marginRight),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),GrabzIt::Utility.nil_int_check(@quality),GrabzIt::Utility.nil_check(@hideElement),GrabzIt::Utility.nil_check(@exportURL),GrabzIt::Utility.nil_check(@waitForElement),GrabzIt::Utility.nil_check(@encryptionKey),GrabzIt::Utility.b_to_str(@noAds),GrabzIt::Utility.nil_check(@post),GrabzIt::Utility.nil_check(@targetElement),GrabzIt::Utility.nil_check(@templateId),GrabzIt::Utility.nil_check(@templateVariables),GrabzIt::Utility.nil_int_check(@height),GrabzIt::Utility.nil_int_check(@width),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@mergeId),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.nil_check(@password),GrabzIt::Utility.nil_check(@clickElement),GrabzIt::Utility.nil_check(@jsCode))
446
+ items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.b_to_str(@includeBackground),@pagesize ,@orientation,GrabzIt::Utility.b_to_str(@includeImages),GrabzIt::Utility.b_to_str(@includeLinks),GrabzIt::Utility.nil_check(@title),GrabzIt::Utility.nil_int_check(@marginTop),GrabzIt::Utility.nil_int_check(@marginLeft),GrabzIt::Utility.nil_int_check(@marginBottom),GrabzIt::Utility.nil_int_check(@marginRight),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),GrabzIt::Utility.nil_int_check(@quality),GrabzIt::Utility.nil_check(@hideElement),GrabzIt::Utility.nil_check(@exportURL),GrabzIt::Utility.nil_check(@waitForElement),GrabzIt::Utility.nil_check(@encryptionKey),GrabzIt::Utility.b_to_str(@noAds),GrabzIt::Utility.nil_check(@post),GrabzIt::Utility.nil_check(@targetElement),GrabzIt::Utility.nil_check(@templateId),GrabzIt::Utility.nil_check(@templateVariables),GrabzIt::Utility.nil_int_check(@height),GrabzIt::Utility.nil_int_check(@width),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@mergeId),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.nil_check(@password),GrabzIt::Utility.nil_check(@clickElement),GrabzIt::Utility.nil_check(@jsCode),GrabzIt::Utility.nil_check(@hoverElement),GrabzIt::Utility.nil_check(@scrollElement))
419
447
  return items.join("|")
420
448
  end
421
449
 
@@ -451,6 +479,8 @@ module GrabzIt
451
479
  params['password'] = GrabzIt::Utility.nil_check(@password)
452
480
  params['click'] = GrabzIt::Utility.nil_check(@clickElement)
453
481
  params['jscode'] = GrabzIt::Utility.nil_check(@jsCode)
482
+ params['hover'] = GrabzIt::Utility.nil_check(@hoverElement)
483
+ params['scroll'] = GrabzIt::Utility.nil_check(@scrollElement)
454
484
 
455
485
  return params;
456
486
  end
@@ -76,6 +76,10 @@ module GrabzIt
76
76
  PARAMETER_INVALID_PASSWORD = 178
77
77
  PARAMETER_INVALID_MERGE = 179
78
78
  PARAMETER_INVALID_CLICK_VALUE = 180
79
+ PARAMETER_DURATION_TOO_LARGE = 181
80
+ PARAMETER_START_TOO_LARGE = 182
81
+ PARAMETER_INVALID_SCROLL_VALUE = 183
82
+ PARAMETER_INVALID_HOVER_VALUE = 184
79
83
  NETWORK_SERVER_OFFLINE = 200
80
84
  NETWORK_GENERAL_ERROR = 201
81
85
  NETWORK_DDOS_ATTACK = 202
@@ -17,6 +17,8 @@ module GrabzIt
17
17
  @clickElement = nil
18
18
  @jsCode = nil
19
19
  @inlineHTML = false
20
+ @scrollElement = nil
21
+ @hoverElement = nil
20
22
  end
21
23
 
22
24
  # @return [Integer] the width of the browser in pixels
@@ -84,6 +86,32 @@ module GrabzIt
84
86
  @clickElement = value
85
87
  end
86
88
 
89
+ # @return [String] get the CSS selector of the HTML element in the web page that must scroll to before the capture is performed
90
+ def scrollElement
91
+ @scrollElement
92
+ end
93
+
94
+ # Set the CSS selector of the HTML element in the web page that must scroll to before the capture is performed
95
+ #
96
+ # @param value [String] the element to scroll to
97
+ # @return [void]
98
+ def scrollElement=(value)
99
+ @scrollElement = value
100
+ end
101
+
102
+ # @return [String] get the CSS selector of the HTML element in the web page that must hovered over before the capture is performed
103
+ def hoverElement
104
+ @hoverElement
105
+ end
106
+
107
+ # Set the CSS selector of the HTML element in the web page that must hovered over before the capture is performed
108
+ #
109
+ # @param value [String] the element to hover over
110
+ # @return [void]
111
+ def hoverElement=(value)
112
+ @hoverElement = value
113
+ end
114
+
87
115
  # @return [Integer] get which user agent type should be used
88
116
  def requestAs
89
117
  @requestAs
@@ -179,7 +207,7 @@ module GrabzIt
179
207
  items.push(GrabzIt::Utility.nil_check(url))
180
208
  end
181
209
 
182
- items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_int_check(@browserHeight),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),GrabzIt::Utility.nil_check(@exportURL),GrabzIt::Utility.nil_check(@waitForElement),GrabzIt::Utility.nil_check(@encryptionKey),GrabzIt::Utility.b_to_str(@noAds),GrabzIt::Utility.nil_check(@post),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.nil_check(@clickElement),GrabzIt::Utility.nil_check(@jsCode),GrabzIt::Utility.b_to_str(@inlineHTML))
210
+ items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_int_check(@browserHeight),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),GrabzIt::Utility.nil_check(@exportURL),GrabzIt::Utility.nil_check(@waitForElement),GrabzIt::Utility.nil_check(@encryptionKey),GrabzIt::Utility.b_to_str(@noAds),GrabzIt::Utility.nil_check(@post),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.nil_check(@clickElement),GrabzIt::Utility.nil_check(@jsCode),GrabzIt::Utility.b_to_str(@inlineHTML),GrabzIt::Utility.nil_check(@hoverElement),GrabzIt::Utility.nil_check(@scrollElement))
183
211
 
184
212
  return items.join("|")
185
213
  end
@@ -199,6 +227,8 @@ module GrabzIt
199
227
  params['click'] = GrabzIt::Utility.nil_check(@clickElement)
200
228
  params['jscode'] = GrabzIt::Utility.nil_check(@jsCode)
201
229
  params['inlinehtml'] = GrabzIt::Utility.b_to_str(@inlineHTML)
230
+ params['hover'] = GrabzIt::Utility.nil_check(@hoverElement)
231
+ params['scroll'] = GrabzIt::Utility.nil_check(@scrollElement)
202
232
 
203
233
  return params
204
234
  end
@@ -25,6 +25,8 @@ module GrabzIt
25
25
  @hd = false
26
26
  @clickElement = nil
27
27
  @jsCode = nil
28
+ @scrollElement = nil
29
+ @hoverElement = nil
28
30
  end
29
31
 
30
32
  # @return [Integer] the width of the browser in pixels
@@ -157,6 +159,32 @@ module GrabzIt
157
159
  @clickElement = value
158
160
  end
159
161
 
162
+ # @return [String] get the CSS selector of the HTML element in the web page that must scroll to before the capture is performed
163
+ def scrollElement
164
+ @scrollElement
165
+ end
166
+
167
+ # Set the CSS selector of the HTML element in the web page that must scroll to before the capture is performed
168
+ #
169
+ # @param value [String] the element to scroll to
170
+ # @return [void]
171
+ def scrollElement=(value)
172
+ @scrollElement = value
173
+ end
174
+
175
+ # @return [String] get the CSS selector of the HTML element in the web page that must hovered over before the capture is performed
176
+ def hoverElement
177
+ @hoverElement
178
+ end
179
+
180
+ # Set the CSS selector of the HTML element in the web page that must hovered over before the capture is performed
181
+ #
182
+ # @param value [String] the element to hover over
183
+ # @return [void]
184
+ def hoverElement=(value)
185
+ @hoverElement = value
186
+ end
187
+
160
188
  # @return [Integer] get which user agent type should be used
161
189
  def requestAs
162
190
  @requestAs
@@ -291,7 +319,7 @@ module GrabzIt
291
319
  items.push(GrabzIt::Utility.nil_check(url))
292
320
  end
293
321
 
294
- items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@format),GrabzIt::Utility.nil_int_check(@height),GrabzIt::Utility.nil_int_check(@width),GrabzIt::Utility.nil_int_check(@browserHeight),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_check(@targetElement),GrabzIt::Utility.nil_check(@customWaterMarkId),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),GrabzIt::Utility.nil_int_check(@quality),GrabzIt::Utility.nil_check(@hideElement),GrabzIt::Utility.nil_check(@exportURL),GrabzIt::Utility.nil_check(@waitForElement),GrabzIt::Utility.b_to_str(@transparent),GrabzIt::Utility.nil_check(@encryptionKey),GrabzIt::Utility.b_to_str(@noAds),GrabzIt::Utility.nil_check(@post),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.b_to_str(@hd),GrabzIt::Utility.nil_check(@clickElement),GrabzIt::Utility.nil_check(@jsCode))
322
+ items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@format),GrabzIt::Utility.nil_int_check(@height),GrabzIt::Utility.nil_int_check(@width),GrabzIt::Utility.nil_int_check(@browserHeight),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_check(@targetElement),GrabzIt::Utility.nil_check(@customWaterMarkId),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),GrabzIt::Utility.nil_int_check(@quality),GrabzIt::Utility.nil_check(@hideElement),GrabzIt::Utility.nil_check(@exportURL),GrabzIt::Utility.nil_check(@waitForElement),GrabzIt::Utility.b_to_str(@transparent),GrabzIt::Utility.nil_check(@encryptionKey),GrabzIt::Utility.b_to_str(@noAds),GrabzIt::Utility.nil_check(@post),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.b_to_str(@hd),GrabzIt::Utility.nil_check(@clickElement),GrabzIt::Utility.nil_check(@jsCode),GrabzIt::Utility.nil_check(@hoverElement),GrabzIt::Utility.nil_check(@scrollElement))
295
323
 
296
324
  return items.join("|")
297
325
  end
@@ -319,6 +347,8 @@ module GrabzIt
319
347
  params['hd'] = GrabzIt::Utility.b_to_str(@hd)
320
348
  params['click'] = GrabzIt::Utility.nil_check(@clickElement)
321
349
  params['jscode'] = GrabzIt::Utility.nil_check(@jsCode)
350
+ params['hover'] = GrabzIt::Utility.nil_check(@hoverElement)
351
+ params['scroll'] = GrabzIt::Utility.nil_check(@scrollElement)
322
352
 
323
353
  return params
324
354
  end
@@ -37,6 +37,8 @@ module GrabzIt
37
37
  @password = nil
38
38
  @clickElement = nil
39
39
  @jsCode = nil
40
+ @scrollElement = nil
41
+ @hoverElement = nil
40
42
  end
41
43
 
42
44
  # @return [Boolean] true if the background of the web page should be included in the PDF
@@ -354,6 +356,32 @@ module GrabzIt
354
356
  @clickElement = value
355
357
  end
356
358
 
359
+ # @return [String] get the CSS selector of the HTML element in the web page that must scroll to before the capture is performed
360
+ def scrollElement
361
+ @scrollElement
362
+ end
363
+
364
+ # Set the CSS selector of the HTML element in the web page that must scroll to before the capture is performed
365
+ #
366
+ # @param value [String] the element to scroll to
367
+ # @return [void]
368
+ def scrollElement=(value)
369
+ @scrollElement = value
370
+ end
371
+
372
+ # @return [String] get the CSS selector of the HTML element in the web page that must hovered over before the capture is performed
373
+ def hoverElement
374
+ @hoverElement
375
+ end
376
+
377
+ # Set the CSS selector of the HTML element in the web page that must hovered over before the capture is performed
378
+ #
379
+ # @param value [String] the element to hover over
380
+ # @return [void]
381
+ def hoverElement=(value)
382
+ @hoverElement = value
383
+ end
384
+
357
385
  # @return [String] get the ID of a capture that should be merged at the beginning of the new PDF document
358
386
  def mergeId
359
387
  @mergeId
@@ -457,7 +485,7 @@ module GrabzIt
457
485
  items.push(GrabzIt::Utility.nil_check(url))
458
486
  end
459
487
 
460
- items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.b_to_str(@includeBackground),@pagesize ,@orientation,GrabzIt::Utility.nil_check(@customWaterMarkId),GrabzIt::Utility.b_to_str(@includeLinks),GrabzIt::Utility.b_to_str(@includeOutline),GrabzIt::Utility.nil_check(@title),GrabzIt::Utility.nil_check(@coverURL),GrabzIt::Utility.nil_int_check(@marginTop),GrabzIt::Utility.nil_int_check(@marginLeft),GrabzIt::Utility.nil_int_check(@marginBottom),GrabzIt::Utility.nil_int_check(@marginRight),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),GrabzIt::Utility.nil_int_check(@quality),GrabzIt::Utility.nil_check(@templateId),GrabzIt::Utility.nil_check(@hideElement),GrabzIt::Utility.nil_check(@targetElement),GrabzIt::Utility.nil_check(@exportURL),GrabzIt::Utility.nil_check(@waitForElement),GrabzIt::Utility.nil_check(@encryptionKey),GrabzIt::Utility.b_to_str(@noAds),GrabzIt::Utility.nil_check(@post),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_int_check(@height),GrabzIt::Utility.nil_int_check(@width),GrabzIt::Utility.nil_check(@templateVariables),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@mergeId),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.nil_check(@cssMediaType),GrabzIt::Utility.nil_check(@password),GrabzIt::Utility.nil_check(@clickElement),GrabzIt::Utility.nil_check(@jsCode))
488
+ items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.b_to_str(@includeBackground),@pagesize ,@orientation,GrabzIt::Utility.nil_check(@customWaterMarkId),GrabzIt::Utility.b_to_str(@includeLinks),GrabzIt::Utility.b_to_str(@includeOutline),GrabzIt::Utility.nil_check(@title),GrabzIt::Utility.nil_check(@coverURL),GrabzIt::Utility.nil_int_check(@marginTop),GrabzIt::Utility.nil_int_check(@marginLeft),GrabzIt::Utility.nil_int_check(@marginBottom),GrabzIt::Utility.nil_int_check(@marginRight),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),GrabzIt::Utility.nil_int_check(@quality),GrabzIt::Utility.nil_check(@templateId),GrabzIt::Utility.nil_check(@hideElement),GrabzIt::Utility.nil_check(@targetElement),GrabzIt::Utility.nil_check(@exportURL),GrabzIt::Utility.nil_check(@waitForElement),GrabzIt::Utility.nil_check(@encryptionKey),GrabzIt::Utility.b_to_str(@noAds),GrabzIt::Utility.nil_check(@post),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_int_check(@height),GrabzIt::Utility.nil_int_check(@width),GrabzIt::Utility.nil_check(@templateVariables),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@mergeId),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.nil_check(@cssMediaType),GrabzIt::Utility.nil_check(@password),GrabzIt::Utility.nil_check(@clickElement),GrabzIt::Utility.nil_check(@jsCode),GrabzIt::Utility.nil_check(@hoverElement),GrabzIt::Utility.nil_check(@scrollElement))
461
489
 
462
490
  return items.join("|")
463
491
  end
@@ -497,6 +525,8 @@ module GrabzIt
497
525
  params['password'] = GrabzIt::Utility.nil_check(@password)
498
526
  params['click'] = GrabzIt::Utility.nil_check(@clickElement)
499
527
  params['jscode'] = GrabzIt::Utility.nil_check(@jsCode)
528
+ params['hover'] = GrabzIt::Utility.nil_check(@hoverElement)
529
+ params['scroll'] = GrabzIt::Utility.nil_check(@scrollElement)
500
530
 
501
531
  return params;
502
532
  end
@@ -22,6 +22,8 @@ module GrabzIt
22
22
  @duration = 10
23
23
  @framesPerSecond = 0
24
24
  @jsCode = nil
25
+ @scrollElement = nil
26
+ @hoverElement = nil
25
27
  end
26
28
 
27
29
  # @return [Integer] the width of the browser in pixels
@@ -102,6 +104,32 @@ module GrabzIt
102
104
  @clickElement = value
103
105
  end
104
106
 
107
+ # @return [String] get the CSS selector of the HTML element in the web page that must scroll to before the capture is performed
108
+ def scrollElement
109
+ @scrollElement
110
+ end
111
+
112
+ # Set the CSS selector of the HTML element in the web page that must scroll to before the capture is performed
113
+ #
114
+ # @param value [String] the element to scroll to
115
+ # @return [void]
116
+ def scrollElement=(value)
117
+ @scrollElement = value
118
+ end
119
+
120
+ # @return [String] get the CSS selector of the HTML element in the web page that must hovered over before the capture is performed
121
+ def hoverElement
122
+ @hoverElement
123
+ end
124
+
125
+ # Set the CSS selector of the HTML element in the web page that must hovered over before the capture is performed
126
+ #
127
+ # @param value [String] the element to hover over
128
+ # @return [void]
129
+ def hoverElement=(value)
130
+ @hoverElement = value
131
+ end
132
+
105
133
  # @return [Integer] get which user agent type should be used
106
134
  def requestAs
107
135
  @requestAs
@@ -257,7 +285,9 @@ module GrabzIt
257
285
  GrabzIt::Utility.nil_int_check(@duration),
258
286
  GrabzIt::Utility.nil_int_check(@width),
259
287
  GrabzIt::Utility.nil_int_check(@height),
260
- GrabzIt::Utility.nil_check(@jsCode))
288
+ GrabzIt::Utility.nil_check(@jsCode),
289
+ GrabzIt::Utility.nil_check(@hoverElement),
290
+ GrabzIt::Utility.nil_check(@scrollElement))
261
291
 
262
292
  return items.join("|")
263
293
  end
@@ -281,6 +311,8 @@ module GrabzIt
281
311
  params['width'] = GrabzIt::Utility.nil_int_check(@width)
282
312
  params['height'] = GrabzIt::Utility.nil_int_check(@height)
283
313
  params['jscode'] = GrabzIt::Utility.nil_check(@jsCode)
314
+ params['hover'] = GrabzIt::Utility.nil_check(@hoverElement)
315
+ params['scroll'] = GrabzIt::Utility.nil_check(@scrollElement)
284
316
 
285
317
  return params
286
318
  end
data/test/test_grabzit.rb CHANGED
@@ -261,6 +261,17 @@ class GrabzItTest < Test::Unit::TestCase
261
261
  end
262
262
  end
263
263
 
264
+ def test_take_video_hover
265
+ assert_nothing_raised "An error occured when trying to take a video" do
266
+ grabzItClient = GrabzIt::Client.new(@applicationKey, @applicationSecret)
267
+ options = GrabzIt::VideoOptions.new()
268
+ options.hoverElement = ".demo-card"
269
+ options.duration = 10
270
+ grabzItClient.url_to_video("https://grabz.it/tests/hover.html", options)
271
+ assert_not_nil(grabzItClient.save(), "Failed to take video using test_take_video_hover method")
272
+ end
273
+ end
274
+
264
275
  def test_take_unicode_url_image
265
276
  assert_nothing_raised "An error occured when trying to take a image screenshot with a unicode URL" do
266
277
  grabzItClient = GrabzIt::Client.new(@applicationKey, @applicationSecret)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grabzit
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.6
4
+ version: 3.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - GrabzIt
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2024-02-07 00:00:00.000000000 Z
10
+ date: 2026-06-17 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rake