ferrumwizard 0.1.3 → 0.1.4

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: d5eb39e3f7b96b87809950695d7987529b5d2abd7fe8a445e5e658453694d3c4
4
- data.tar.gz: ab1de29c5cb1c2c9a904069e0a6ef6d8bf8cbdadd68eba2ad1992945c4189948
3
+ metadata.gz: 96cb226b3acf38c7c4b4f8c82665175025effc7d2cbe25d0ae6026e92109c899
4
+ data.tar.gz: e31dbbc763e88c553881660d7579117781934e92c2eae10f32fff329da670e09
5
5
  SHA512:
6
- metadata.gz: 511884c66a570b8fe74ab14109f3f731316a74824869b73a46cf26bff6b7fbc4f63a92848790229a95aa753b91ff3ada227ebdfa6ed19fe40641da812597d394
7
- data.tar.gz: 166d533864edff9c4b3cd00e9174064a900532bf8e420edf7ea1c4d16dad3145bb99acc0ab93a4ababf7bb76a12f5b383018a1f61ead98433cec2b1de07814d0
6
+ metadata.gz: 0d6f8bd47a33d4d8d3224cc231a993a36c47fa297c91e7b83a3888094de658cf129cc289b001935b442fd96f93103bfe5e214551b5d365de18971330d0e380e2
7
+ data.tar.gz: 7fce37cf15f5a493b0261b36eb843ad8087a19b040c14176a0488b0ab0c84220b5e70c12fdb5a962443608092e148b7ecff2832311d7395209115e5cfec5e268
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -14,9 +14,13 @@ class FerrumWizard
14
14
 
15
15
  @url, @debug = url, debug
16
16
  @browser = Ferrum::Browser.new headless: headless, timeout: timeout
17
- sleep 2
17
+ sleep 3
18
18
 
19
- @browser.goto url if url
19
+ if url
20
+ @browser.goto(@url)
21
+ @browser.network.wait_for_idle
22
+ sleep 4
23
+ end
20
24
  end
21
25
 
22
26
  def inspect()
@@ -27,17 +31,12 @@ class FerrumWizard
27
31
 
28
32
  puts 'username: ' + username.inspect if @debug
29
33
 
30
- b = @browser
31
- b.goto(@url)
32
- @browser.network.wait_for_idle
33
- sleep 3
34
-
35
34
  # search for the username input box
36
- e_username = b.at_xpath('//input[@type="email"]')
35
+ e_username = @browser.at_xpath('//input[@type="email"]')
37
36
  puts 'e_username: ' + e_username.inspect if @debug
38
37
  sleep 1
39
38
  # search for the password input box
40
- e_password = b.at_xpath('//input[@type="password"]')
39
+ e_password = @browser.at_xpath('//input[@type="password"]')
41
40
  sleep 1
42
41
 
43
42
  if username and e_username then
@@ -56,13 +55,8 @@ class FerrumWizard
56
55
 
57
56
  puts 'username: ' + username.inspect if @debug
58
57
 
59
- b = @browser
60
- b.goto(@url)
61
- @browser.network.wait_for_idle
62
- sleep 3
63
-
64
58
  # search for the username input box
65
- e_username = b.at_xpath('//input[@type="email"]')
59
+ e_username = @browser.at_xpath('//input[@type="email"]')
66
60
  puts 'e_username: ' + e_username.inspect if @debug
67
61
  sleep 1
68
62
  # search for the password input box
@@ -129,6 +123,7 @@ class FerrumWizard
129
123
 
130
124
  end
131
125
 
126
+
132
127
  def fetch_buttons()
133
128
 
134
129
  a2 = @browser.xpath('//input[@type="button"]')
@@ -220,9 +215,7 @@ class FerrumWizard
220
215
 
221
216
  # find radio buttons
222
217
 
223
- #a = doc.root.xpath('//input[@type="radio"]')
224
218
  a = @browser.xpath('//input[@type="radio"]')
225
- #h = a.group_by {|x| x.attributes[:name]}
226
219
  h = a.group_by {|x| x.attribute('name')}
227
220
  @radio = h.values
228
221
  define_singleton_method(:on) { @radio[0][0].click; self }
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.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file