puppeteer-bidi 0.0.1.beta8 → 0.0.1.beta9
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 +4 -4
- data/lib/puppeteer/bidi/version.rb +1 -1
- data/lib/puppeteer/bidi.rb +28 -37
- data/sig/puppeteer/bidi.rbs +7 -13
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: edd194659eaec6868546e49ad1536020e2038a24f67a93ed9e001ea6eaeaa2d1
|
|
4
|
+
data.tar.gz: c3953c37832af8ed0d5bba54d874d8ac11e7aeae1dd4ce3def5351ce4b0bcac0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4cf895f21941069d8734ed19cea9e74d337741788cef5077fbcafa3ead9d48863c49004d6979f4433646422902893aa91c79ca7c304431686c2bda040e034b26
|
|
7
|
+
data.tar.gz: 5006742e6f06dc708ae506ed4489a107d34981e29d14de71568f8a9d0ed0411c1f2e29de2b0fd8c039d81b5369895db3a0705b331b125e4f2fb6f5c7c4dabdb4
|
data/lib/puppeteer/bidi.rb
CHANGED
|
@@ -33,51 +33,42 @@ require "puppeteer/bidi/browser"
|
|
|
33
33
|
module Puppeteer
|
|
34
34
|
module Bidi
|
|
35
35
|
# Launch a new browser instance
|
|
36
|
+
#
|
|
36
37
|
# @rbs executable_path: String? -- Path to browser executable
|
|
37
38
|
# @rbs user_data_dir: String? -- Path to user data directory
|
|
38
|
-
# @rbs headless: bool -- Run browser in headless mode
|
|
39
|
+
# @rbs headless: bool? -- Run browser in headless mode
|
|
39
40
|
# @rbs args: Array[String]? -- Additional browser arguments
|
|
40
41
|
# @rbs timeout: Numeric? -- Launch timeout in seconds
|
|
41
|
-
#
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
browser&.close
|
|
42
|
+
#
|
|
43
|
+
#: (executable_path: String? , user_data_dir: String? , headless: bool , args: Array[String]? , timeout: Numeric?) -> Browser
|
|
44
|
+
#: (executable_path: String? , user_data_dir: String? , headless: bool , args: Array[String]? , timeout: Numeric?) { (Browser) -> untyped } -> untyped
|
|
45
|
+
def self.launch(executable_path: nil, user_data_dir: nil, headless: true, args: nil, timeout: nil, &block)
|
|
46
|
+
if block
|
|
47
|
+
Sync do
|
|
48
|
+
begin
|
|
49
|
+
browser = Browser.launch(
|
|
50
|
+
executable_path: executable_path,
|
|
51
|
+
user_data_dir: user_data_dir,
|
|
52
|
+
headless: headless,
|
|
53
|
+
args: args,
|
|
54
|
+
timeout: timeout
|
|
55
|
+
)
|
|
56
|
+
block.call(browser)
|
|
57
|
+
ensure
|
|
58
|
+
browser&.close
|
|
59
|
+
end
|
|
60
60
|
end
|
|
61
|
+
else
|
|
62
|
+
Browser.launch(
|
|
63
|
+
executable_path: executable_path,
|
|
64
|
+
user_data_dir: user_data_dir,
|
|
65
|
+
headless: headless,
|
|
66
|
+
args: args,
|
|
67
|
+
timeout: timeout
|
|
68
|
+
)
|
|
61
69
|
end
|
|
62
70
|
end
|
|
63
71
|
|
|
64
|
-
# Launch a new browser instance
|
|
65
|
-
# @rbs executable_path: String? -- Path to browser executable
|
|
66
|
-
# @rbs user_data_dir: String? -- Path to user data directory
|
|
67
|
-
# @rbs headless: bool -- Run browser in headless mode
|
|
68
|
-
# @rbs args: Array[String]? -- Additional browser arguments
|
|
69
|
-
# @rbs timeout: Numeric? -- Launch timeout in seconds
|
|
70
|
-
# @rbs return: Browser -- Browser instance (if no block given)
|
|
71
|
-
def self.launch(executable_path: nil, user_data_dir: nil, headless: true, args: nil, timeout: nil)
|
|
72
|
-
Browser.launch(
|
|
73
|
-
executable_path: executable_path,
|
|
74
|
-
user_data_dir: user_data_dir,
|
|
75
|
-
headless: headless,
|
|
76
|
-
args: args,
|
|
77
|
-
timeout: timeout
|
|
78
|
-
)
|
|
79
|
-
end
|
|
80
|
-
|
|
81
72
|
# Connect to an existing browser instance
|
|
82
73
|
# @rbs ws_endpoint: String -- WebSocket endpoint URL
|
|
83
74
|
# @rbs return: Browser -- Browser instance
|
data/sig/puppeteer/bidi.rbs
CHANGED
|
@@ -3,23 +3,17 @@
|
|
|
3
3
|
module Puppeteer
|
|
4
4
|
module Bidi
|
|
5
5
|
# Launch a new browser instance
|
|
6
|
+
#
|
|
6
7
|
# @rbs executable_path: String? -- Path to browser executable
|
|
7
8
|
# @rbs user_data_dir: String? -- Path to user data directory
|
|
8
|
-
# @rbs headless: bool -- Run browser in headless mode
|
|
9
|
+
# @rbs headless: bool? -- Run browser in headless mode
|
|
9
10
|
# @rbs args: Array[String]? -- Additional browser arguments
|
|
10
11
|
# @rbs timeout: Numeric? -- Launch timeout in seconds
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
# @rbs executable_path: String? -- Path to browser executable
|
|
17
|
-
# @rbs user_data_dir: String? -- Path to user data directory
|
|
18
|
-
# @rbs headless: bool -- Run browser in headless mode
|
|
19
|
-
# @rbs args: Array[String]? -- Additional browser arguments
|
|
20
|
-
# @rbs timeout: Numeric? -- Launch timeout in seconds
|
|
21
|
-
# @rbs return: Browser -- Browser instance (if no block given)
|
|
22
|
-
def self.launch: (?executable_path: String?, ?user_data_dir: String?, ?headless: bool, ?args: Array[String]?, ?timeout: Numeric?) -> Browser
|
|
12
|
+
#
|
|
13
|
+
# : (executable_path: String? , user_data_dir: String? , headless: bool , args: Array[String]? , timeout: Numeric?) -> Browser
|
|
14
|
+
# : (executable_path: String? , user_data_dir: String? , headless: bool , args: Array[String]? , timeout: Numeric?) { (Browser) -> untyped } -> untyped
|
|
15
|
+
def self.launch: (executable_path: String?, user_data_dir: String?, headless: bool, args: Array[String]?, timeout: Numeric?) -> Browser
|
|
16
|
+
| (executable_path: String?, user_data_dir: String?, headless: bool, args: Array[String]?, timeout: Numeric?) { (Browser) -> untyped } -> untyped
|
|
23
17
|
|
|
24
18
|
# Connect to an existing browser instance
|
|
25
19
|
# @rbs ws_endpoint: String -- WebSocket endpoint URL
|