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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b012bc3e8cb9b91311c91eecef6b816cae7bc3d179dc037ac0011373e1d54d2
4
- data.tar.gz: f0421333194ed8b204ea87beab02314a44f978bbafa28809622b89d1db26bd4f
3
+ metadata.gz: 2b8068fb08b6eb2a2c96e42a22e4e2290484fa98ca27271b3731d858e39d7bf5
4
+ data.tar.gz: a939996048a46f321bf66c4dc86991f9a37c91393599782e9d3a147a473e2216
5
5
  SHA512:
6
- metadata.gz: b96dd21840cbed0d1253f4795ddf4a4cf36250d5d3736b918c70c7c48ef63d4e8ba31592395cce6de691049a076f41186337a92643e3e1748e122f58edc51905
7
- data.tar.gz: 39d7c5cc96e6900db1bbfa668ba9b972d49f09147d0fc5b079c34fd40e7235bb256a1713c1bf5725a16c0087dca959d5df8b12b7f10e093891478bf0a33f53f2
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, debug: false)
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
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ferrumwizard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file