ferrumwizard 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/ferrumwizard.rb +9 -2
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b8068fb08b6eb2a2c96e42a22e4e2290484fa98ca27271b3731d858e39d7bf5
|
4
|
+
data.tar.gz: a939996048a46f321bf66c4dc86991f9a37c91393599782e9d3a147a473e2216
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17c6c8faf26098abcbd716cedb7ba4a4c9d935595af6c4e1626887b3a465ab6632d68502f4f01f5f61f5af59a78c0a629da36e4ea6c0b11a35d1ce1f994872d1
|
7
|
+
data.tar.gz: 950098796922e1b514df83e92438f533ad92fa6bfb40208001d3b1de12b7810b87fa3f888a8f6733061e5f0672fb8e2919358ca52a11bef12b5bb24b40bcf451
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/ferrumwizard.rb
CHANGED
@@ -11,16 +11,21 @@ class FerrumWizard
|
|
11
11
|
|
12
12
|
attr_reader :browser, :links, :radio, :buttons, :js_methods
|
13
13
|
|
14
|
-
def initialize(url=nil, headless: true, timeout: 10,
|
14
|
+
def initialize(url=nil, headless: true, timeout: 10, cookies: nil,
|
15
|
+
debug: false)
|
15
16
|
|
16
17
|
@url, @debug = url, debug
|
17
18
|
@browser = Ferrum::Browser.new headless: headless, timeout: timeout
|
18
19
|
sleep 3
|
19
20
|
|
20
|
-
if url
|
21
|
+
if url then
|
22
|
+
|
23
|
+
loadx(cookies) if cookies
|
24
|
+
|
21
25
|
@browser.goto(@url)
|
22
26
|
@browser.network.wait_for_idle
|
23
27
|
sleep 4
|
28
|
+
|
24
29
|
end
|
25
30
|
end
|
26
31
|
|
@@ -61,6 +66,8 @@ class FerrumWizard
|
|
61
66
|
|
62
67
|
end
|
63
68
|
|
69
|
+
alias loadx load_cookies
|
70
|
+
|
64
71
|
def login(usernamex=nil, passwordx=nil, username: usernamex, password: passwordx)
|
65
72
|
|
66
73
|
puts 'username: ' + username.inspect if @debug
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|