puppeteer-ruby 0.40.3 → 0.40.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/docs/api_coverage.md +4 -3
- data/lib/puppeteer/console_message.rb +14 -4
- data/lib/puppeteer/devices.rb +364 -0
- data/lib/puppeteer/page.rb +12 -10
- data/lib/puppeteer/version.rb +1 -1
- data/puppeteer-ruby.gemspec +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1c608c27cbcee1c2038a3ecb2ba5244ef75906136fdd7aa868c521cd8248053
|
4
|
+
data.tar.gz: 9535f70cb9b6056324c9828fff4c9e4412e0fbd48c2ac7a7bd8308bc51d1d26c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d9da0c4e2820117bff76f55bf5c9141c1b2ac8af351f6c27951df5bb20c5825a321c33f4ddde13b1e77864fd1c29803d5eb5f014df80d1b596a850a2d7f0ac3
|
7
|
+
data.tar.gz: f6159e8906c6f35b67057ef47e4e675bfeeb824ee7abaee0d52f5d25ef7bea6f6c7fe699af3a8fee9bbd1020a7894966ee4826d38d01d74e4860f8ead4b759c7
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,13 @@
|
|
1
|
-
### main [[diff](https://github.com/YusukeIwaki/puppeteer-ruby/compare/0.40.
|
1
|
+
### main [[diff](https://github.com/YusukeIwaki/puppeteer-ruby/compare/0.40.4...main)]
|
2
2
|
|
3
3
|
- xxx
|
4
4
|
|
5
|
+
### 0.40.4 [[diff](https://github.com/YusukeIwaki/puppeteer-ruby/compare/0.40.3...0.40.4)]
|
6
|
+
|
7
|
+
Bugfix:
|
8
|
+
|
9
|
+
- Fix warning on handling console message.
|
10
|
+
|
5
11
|
### 0.40.3 [[diff](https://github.com/YusukeIwaki/puppeteer-ruby/compare/0.40.2...0.40.3)]
|
6
12
|
|
7
13
|
Bugfix:
|
data/docs/api_coverage.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# API coverages
|
2
|
-
- Puppeteer version: v13.
|
3
|
-
- puppeteer-ruby version: 0.40.
|
2
|
+
- Puppeteer version: v13.5.1
|
3
|
+
- puppeteer-ruby version: 0.40.4
|
4
4
|
|
5
5
|
## Puppeteer
|
6
6
|
|
@@ -204,7 +204,7 @@
|
|
204
204
|
|
205
205
|
* args
|
206
206
|
* location
|
207
|
-
*
|
207
|
+
* stackTrace => `#stack_trace`
|
208
208
|
* text
|
209
209
|
* ~~type~~
|
210
210
|
|
@@ -337,6 +337,7 @@
|
|
337
337
|
* status
|
338
338
|
* statusText => `#status_text`
|
339
339
|
* text
|
340
|
+
* ~~timing~~
|
340
341
|
* url
|
341
342
|
|
342
343
|
## ~~SecurityDetails~~
|
@@ -12,13 +12,23 @@ class Puppeteer::ConsoleMessage
|
|
12
12
|
# @param log_type [String]
|
13
13
|
# @param text [String]
|
14
14
|
# @param args [Array<Puppeteer::JSHandle>]
|
15
|
-
# @param
|
16
|
-
def initialize(log_type, text, args,
|
15
|
+
# @param stack_trace_locations [Array<Location>]
|
16
|
+
def initialize(log_type, text, args, stack_trace_locations)
|
17
17
|
@log_type = log_type
|
18
18
|
@text = text
|
19
19
|
@args = args
|
20
|
-
@
|
20
|
+
@stack_trace_locations = stack_trace_locations
|
21
21
|
end
|
22
22
|
|
23
|
-
attr_reader :log_type, :text, :args
|
23
|
+
attr_reader :log_type, :text, :args
|
24
|
+
|
25
|
+
# @return [Location]
|
26
|
+
def location
|
27
|
+
@stack_trace_locations.first
|
28
|
+
end
|
29
|
+
|
30
|
+
# @return [Array<Location>]
|
31
|
+
def stack_trace
|
32
|
+
@stack_trace_locations
|
33
|
+
end
|
24
34
|
end
|
data/lib/puppeteer/devices.rb
CHANGED
@@ -262,6 +262,58 @@ Puppeteer::DEVICES = Hash[
|
|
262
262
|
isLandscape: true,
|
263
263
|
},
|
264
264
|
},
|
265
|
+
{
|
266
|
+
name: 'iPad (gen 6)',
|
267
|
+
userAgent:
|
268
|
+
'Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
269
|
+
viewport: {
|
270
|
+
width: 768,
|
271
|
+
height: 1024,
|
272
|
+
deviceScaleFactor: 2,
|
273
|
+
isMobile: true,
|
274
|
+
hasTouch: true,
|
275
|
+
isLandscape: false,
|
276
|
+
},
|
277
|
+
},
|
278
|
+
{
|
279
|
+
name: 'iPad (gen 6) landscape',
|
280
|
+
userAgent:
|
281
|
+
'Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
282
|
+
viewport: {
|
283
|
+
width: 1024,
|
284
|
+
height: 768,
|
285
|
+
deviceScaleFactor: 2,
|
286
|
+
isMobile: true,
|
287
|
+
hasTouch: true,
|
288
|
+
isLandscape: true,
|
289
|
+
},
|
290
|
+
},
|
291
|
+
{
|
292
|
+
name: 'iPad (gen 7)',
|
293
|
+
userAgent:
|
294
|
+
'Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
295
|
+
viewport: {
|
296
|
+
width: 810,
|
297
|
+
height: 1080,
|
298
|
+
deviceScaleFactor: 2,
|
299
|
+
isMobile: true,
|
300
|
+
hasTouch: true,
|
301
|
+
isLandscape: false,
|
302
|
+
},
|
303
|
+
},
|
304
|
+
{
|
305
|
+
name: 'iPad (gen 7) landscape',
|
306
|
+
userAgent:
|
307
|
+
'Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
308
|
+
viewport: {
|
309
|
+
width: 1080,
|
310
|
+
height: 810,
|
311
|
+
deviceScaleFactor: 2,
|
312
|
+
isMobile: true,
|
313
|
+
hasTouch: true,
|
314
|
+
isLandscape: true,
|
315
|
+
},
|
316
|
+
},
|
265
317
|
{
|
266
318
|
name: 'iPad Mini',
|
267
319
|
userAgent:
|
@@ -314,6 +366,32 @@ Puppeteer::DEVICES = Hash[
|
|
314
366
|
isLandscape: true,
|
315
367
|
},
|
316
368
|
},
|
369
|
+
{
|
370
|
+
name: 'iPad Pro 11',
|
371
|
+
userAgent:
|
372
|
+
'Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
373
|
+
viewport: {
|
374
|
+
width: 834,
|
375
|
+
height: 1194,
|
376
|
+
deviceScaleFactor: 2,
|
377
|
+
isMobile: true,
|
378
|
+
hasTouch: true,
|
379
|
+
isLandscape: false,
|
380
|
+
},
|
381
|
+
},
|
382
|
+
{
|
383
|
+
name: 'iPad Pro 11 landscape',
|
384
|
+
userAgent:
|
385
|
+
'Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
386
|
+
viewport: {
|
387
|
+
width: 1194,
|
388
|
+
height: 834,
|
389
|
+
deviceScaleFactor: 2,
|
390
|
+
isMobile: true,
|
391
|
+
hasTouch: true,
|
392
|
+
isLandscape: true,
|
393
|
+
},
|
394
|
+
},
|
317
395
|
{
|
318
396
|
name: 'iPhone 4',
|
319
397
|
userAgent:
|
@@ -678,6 +756,214 @@ Puppeteer::DEVICES = Hash[
|
|
678
756
|
isLandscape: true,
|
679
757
|
},
|
680
758
|
},
|
759
|
+
{
|
760
|
+
name: 'iPhone 12',
|
761
|
+
userAgent:
|
762
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
763
|
+
viewport: {
|
764
|
+
width: 390,
|
765
|
+
height: 844,
|
766
|
+
deviceScaleFactor: 3,
|
767
|
+
isMobile: true,
|
768
|
+
hasTouch: true,
|
769
|
+
isLandscape: false,
|
770
|
+
},
|
771
|
+
},
|
772
|
+
{
|
773
|
+
name: 'iPhone 12 landscape',
|
774
|
+
userAgent:
|
775
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
776
|
+
viewport: {
|
777
|
+
width: 844,
|
778
|
+
height: 390,
|
779
|
+
deviceScaleFactor: 3,
|
780
|
+
isMobile: true,
|
781
|
+
hasTouch: true,
|
782
|
+
isLandscape: true,
|
783
|
+
},
|
784
|
+
},
|
785
|
+
{
|
786
|
+
name: 'iPhone 12 Pro',
|
787
|
+
userAgent:
|
788
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
789
|
+
viewport: {
|
790
|
+
width: 390,
|
791
|
+
height: 844,
|
792
|
+
deviceScaleFactor: 3,
|
793
|
+
isMobile: true,
|
794
|
+
hasTouch: true,
|
795
|
+
isLandscape: false,
|
796
|
+
},
|
797
|
+
},
|
798
|
+
{
|
799
|
+
name: 'iPhone 12 Pro landscape',
|
800
|
+
userAgent:
|
801
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
802
|
+
viewport: {
|
803
|
+
width: 844,
|
804
|
+
height: 390,
|
805
|
+
deviceScaleFactor: 3,
|
806
|
+
isMobile: true,
|
807
|
+
hasTouch: true,
|
808
|
+
isLandscape: true,
|
809
|
+
},
|
810
|
+
},
|
811
|
+
{
|
812
|
+
name: 'iPhone 12 Pro Max',
|
813
|
+
userAgent:
|
814
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
815
|
+
viewport: {
|
816
|
+
width: 428,
|
817
|
+
height: 926,
|
818
|
+
deviceScaleFactor: 3,
|
819
|
+
isMobile: true,
|
820
|
+
hasTouch: true,
|
821
|
+
isLandscape: false,
|
822
|
+
},
|
823
|
+
},
|
824
|
+
{
|
825
|
+
name: 'iPhone 12 Pro Max landscape',
|
826
|
+
userAgent:
|
827
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
828
|
+
viewport: {
|
829
|
+
width: 926,
|
830
|
+
height: 428,
|
831
|
+
deviceScaleFactor: 3,
|
832
|
+
isMobile: true,
|
833
|
+
hasTouch: true,
|
834
|
+
isLandscape: true,
|
835
|
+
},
|
836
|
+
},
|
837
|
+
{
|
838
|
+
name: 'iPhone 12 Mini',
|
839
|
+
userAgent:
|
840
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
841
|
+
viewport: {
|
842
|
+
width: 375,
|
843
|
+
height: 812,
|
844
|
+
deviceScaleFactor: 3,
|
845
|
+
isMobile: true,
|
846
|
+
hasTouch: true,
|
847
|
+
isLandscape: false,
|
848
|
+
},
|
849
|
+
},
|
850
|
+
{
|
851
|
+
name: 'iPhone 12 Mini landscape',
|
852
|
+
userAgent:
|
853
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
854
|
+
viewport: {
|
855
|
+
width: 812,
|
856
|
+
height: 375,
|
857
|
+
deviceScaleFactor: 3,
|
858
|
+
isMobile: true,
|
859
|
+
hasTouch: true,
|
860
|
+
isLandscape: true,
|
861
|
+
},
|
862
|
+
},
|
863
|
+
{
|
864
|
+
name: 'iPhone 13',
|
865
|
+
userAgent:
|
866
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
867
|
+
viewport: {
|
868
|
+
width: 390,
|
869
|
+
height: 844,
|
870
|
+
deviceScaleFactor: 3,
|
871
|
+
isMobile: true,
|
872
|
+
hasTouch: true,
|
873
|
+
isLandscape: false,
|
874
|
+
},
|
875
|
+
},
|
876
|
+
{
|
877
|
+
name: 'iPhone 13 landscape',
|
878
|
+
userAgent:
|
879
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
880
|
+
viewport: {
|
881
|
+
width: 844,
|
882
|
+
height: 390,
|
883
|
+
deviceScaleFactor: 3,
|
884
|
+
isMobile: true,
|
885
|
+
hasTouch: true,
|
886
|
+
isLandscape: true,
|
887
|
+
},
|
888
|
+
},
|
889
|
+
{
|
890
|
+
name: 'iPhone 13 Pro',
|
891
|
+
userAgent:
|
892
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
893
|
+
viewport: {
|
894
|
+
width: 390,
|
895
|
+
height: 844,
|
896
|
+
deviceScaleFactor: 3,
|
897
|
+
isMobile: true,
|
898
|
+
hasTouch: true,
|
899
|
+
isLandscape: false,
|
900
|
+
},
|
901
|
+
},
|
902
|
+
{
|
903
|
+
name: 'iPhone 13 Pro landscape',
|
904
|
+
userAgent:
|
905
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
906
|
+
viewport: {
|
907
|
+
width: 844,
|
908
|
+
height: 390,
|
909
|
+
deviceScaleFactor: 3,
|
910
|
+
isMobile: true,
|
911
|
+
hasTouch: true,
|
912
|
+
isLandscape: true,
|
913
|
+
},
|
914
|
+
},
|
915
|
+
{
|
916
|
+
name: 'iPhone 13 Pro Max',
|
917
|
+
userAgent:
|
918
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
919
|
+
viewport: {
|
920
|
+
width: 428,
|
921
|
+
height: 926,
|
922
|
+
deviceScaleFactor: 3,
|
923
|
+
isMobile: true,
|
924
|
+
hasTouch: true,
|
925
|
+
isLandscape: false,
|
926
|
+
},
|
927
|
+
},
|
928
|
+
{
|
929
|
+
name: 'iPhone 13 Pro Max landscape',
|
930
|
+
userAgent:
|
931
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
932
|
+
viewport: {
|
933
|
+
width: 926,
|
934
|
+
height: 428,
|
935
|
+
deviceScaleFactor: 3,
|
936
|
+
isMobile: true,
|
937
|
+
hasTouch: true,
|
938
|
+
isLandscape: true,
|
939
|
+
},
|
940
|
+
},
|
941
|
+
{
|
942
|
+
name: 'iPhone 13 Mini',
|
943
|
+
userAgent:
|
944
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
945
|
+
viewport: {
|
946
|
+
width: 375,
|
947
|
+
height: 812,
|
948
|
+
deviceScaleFactor: 3,
|
949
|
+
isMobile: true,
|
950
|
+
hasTouch: true,
|
951
|
+
isLandscape: false,
|
952
|
+
},
|
953
|
+
},
|
954
|
+
{
|
955
|
+
name: 'iPhone 13 Mini landscape',
|
956
|
+
userAgent:
|
957
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1',
|
958
|
+
viewport: {
|
959
|
+
width: 812,
|
960
|
+
height: 375,
|
961
|
+
deviceScaleFactor: 3,
|
962
|
+
isMobile: true,
|
963
|
+
hasTouch: true,
|
964
|
+
isLandscape: true,
|
965
|
+
},
|
966
|
+
},
|
681
967
|
{
|
682
968
|
name: 'JioPhone 2',
|
683
969
|
userAgent:
|
@@ -1133,6 +1419,84 @@ Puppeteer::DEVICES = Hash[
|
|
1133
1419
|
isLandscape: true,
|
1134
1420
|
},
|
1135
1421
|
},
|
1422
|
+
{
|
1423
|
+
name: 'Pixel 4a (5G)',
|
1424
|
+
userAgent:
|
1425
|
+
'Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4812.0 Mobile Safari/537.36',
|
1426
|
+
viewport: {
|
1427
|
+
width: 353,
|
1428
|
+
height: 745,
|
1429
|
+
deviceScaleFactor: 3,
|
1430
|
+
isMobile: true,
|
1431
|
+
hasTouch: true,
|
1432
|
+
isLandscape: false,
|
1433
|
+
},
|
1434
|
+
},
|
1435
|
+
{
|
1436
|
+
name: 'Pixel 4a (5G) landscape',
|
1437
|
+
userAgent:
|
1438
|
+
'Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4812.0 Mobile Safari/537.36',
|
1439
|
+
viewport: {
|
1440
|
+
width: 745,
|
1441
|
+
height: 353,
|
1442
|
+
deviceScaleFactor: 3,
|
1443
|
+
isMobile: true,
|
1444
|
+
hasTouch: true,
|
1445
|
+
isLandscape: true,
|
1446
|
+
},
|
1447
|
+
},
|
1448
|
+
{
|
1449
|
+
name: 'Pixel 5',
|
1450
|
+
userAgent:
|
1451
|
+
'Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4812.0 Mobile Safari/537.36',
|
1452
|
+
viewport: {
|
1453
|
+
width: 393,
|
1454
|
+
height: 851,
|
1455
|
+
deviceScaleFactor: 3,
|
1456
|
+
isMobile: true,
|
1457
|
+
hasTouch: true,
|
1458
|
+
isLandscape: false,
|
1459
|
+
},
|
1460
|
+
},
|
1461
|
+
{
|
1462
|
+
name: 'Pixel 5 landscape',
|
1463
|
+
userAgent:
|
1464
|
+
'Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4812.0 Mobile Safari/537.36',
|
1465
|
+
viewport: {
|
1466
|
+
width: 851,
|
1467
|
+
height: 393,
|
1468
|
+
deviceScaleFactor: 3,
|
1469
|
+
isMobile: true,
|
1470
|
+
hasTouch: true,
|
1471
|
+
isLandscape: true,
|
1472
|
+
},
|
1473
|
+
},
|
1474
|
+
{
|
1475
|
+
name: 'Moto G4',
|
1476
|
+
userAgent:
|
1477
|
+
'Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4812.0 Mobile Safari/537.36',
|
1478
|
+
viewport: {
|
1479
|
+
width: 360,
|
1480
|
+
height: 640,
|
1481
|
+
deviceScaleFactor: 3,
|
1482
|
+
isMobile: true,
|
1483
|
+
hasTouch: true,
|
1484
|
+
isLandscape: false,
|
1485
|
+
},
|
1486
|
+
},
|
1487
|
+
{
|
1488
|
+
name: 'Moto G4 landscape',
|
1489
|
+
userAgent:
|
1490
|
+
'Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4812.0 Mobile Safari/537.36',
|
1491
|
+
viewport: {
|
1492
|
+
width: 640,
|
1493
|
+
height: 360,
|
1494
|
+
deviceScaleFactor: 3,
|
1495
|
+
isMobile: true,
|
1496
|
+
hasTouch: true,
|
1497
|
+
isLandscape: true,
|
1498
|
+
},
|
1499
|
+
},
|
1136
1500
|
].map do |json|
|
1137
1501
|
[
|
1138
1502
|
json[:name],
|
data/lib/puppeteer/page.rb
CHANGED
@@ -508,6 +508,7 @@ class Puppeteer::Page
|
|
508
508
|
end
|
509
509
|
|
510
510
|
private def handle_console_api(event)
|
511
|
+
puts "~~~~~~~~~~~~~~#{event}"
|
511
512
|
if event['executionContextId'] == 0
|
512
513
|
# DevTools protocol stores the last 1000 console messages. These
|
513
514
|
# messages are always reported even for removed execution contexts. In
|
@@ -582,18 +583,19 @@ class Puppeteer::Page
|
|
582
583
|
private def add_console_message(type, args, stack_trace)
|
583
584
|
text_tokens = args.map { |arg| arg.remote_object.value }
|
584
585
|
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
586
|
+
stack_trace_locations =
|
587
|
+
if stack_trace && stack_trace['callFrames']
|
588
|
+
stack_trace['callFrames'].map do |call_frame|
|
589
|
+
Puppeteer::ConsoleMessage::Location.new(
|
590
|
+
url: call_frame['url'],
|
591
|
+
line_number: call_frame['lineNumber'],
|
592
|
+
column_number: call_frame['columnNumber'],
|
593
|
+
)
|
594
|
+
end
|
593
595
|
else
|
594
|
-
|
596
|
+
[]
|
595
597
|
end
|
596
|
-
console_message = Puppeteer::ConsoleMessage.new(type, text_tokens.join(' '), args,
|
598
|
+
console_message = Puppeteer::ConsoleMessage.new(type, text_tokens.join(' '), args, stack_trace_locations)
|
597
599
|
emit_event(PageEmittedEvents::Console, console_message)
|
598
600
|
end
|
599
601
|
|
data/lib/puppeteer/version.rb
CHANGED
data/puppeteer-ruby.gemspec
CHANGED
@@ -30,9 +30,9 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_development_dependency 'pry-byebug'
|
31
31
|
spec.add_development_dependency 'rake', '~> 13.0.3'
|
32
32
|
spec.add_development_dependency 'rollbar'
|
33
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
33
|
+
spec.add_development_dependency 'rspec', '~> 3.11.0'
|
34
34
|
spec.add_development_dependency 'rspec_junit_formatter' # for CircleCI.
|
35
|
-
spec.add_development_dependency 'rubocop', '~> 1.
|
35
|
+
spec.add_development_dependency 'rubocop', '~> 1.26.0'
|
36
36
|
spec.add_development_dependency 'rubocop-rspec'
|
37
37
|
spec.add_development_dependency 'sinatra'
|
38
38
|
spec.add_development_dependency 'webrick'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppeteer-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.40.
|
4
|
+
version: 0.40.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YusukeIwaki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 3.
|
145
|
+
version: 3.11.0
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 3.
|
152
|
+
version: 3.11.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rspec_junit_formatter
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,14 +170,14 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 1.
|
173
|
+
version: 1.26.0
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: 1.
|
180
|
+
version: 1.26.0
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: rubocop-rspec
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -347,7 +347,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
347
347
|
- !ruby/object:Gem::Version
|
348
348
|
version: '0'
|
349
349
|
requirements: []
|
350
|
-
rubygems_version: 3.3.
|
350
|
+
rubygems_version: 3.3.7
|
351
351
|
signing_key:
|
352
352
|
specification_version: 4
|
353
353
|
summary: A ruby port of puppeteer
|