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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/ferrumwizard.rb +10 -17
- 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: 96cb226b3acf38c7c4b4f8c82665175025effc7d2cbe25d0ae6026e92109c899
|
4
|
+
data.tar.gz: e31dbbc763e88c553881660d7579117781934e92c2eae10f32fff329da670e09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d6f8bd47a33d4d8d3224cc231a993a36c47fa297c91e7b83a3888094de658cf129cc289b001935b442fd96f93103bfe5e214551b5d365de18971330d0e380e2
|
7
|
+
data.tar.gz: 7fce37cf15f5a493b0261b36eb843ad8087a19b040c14176a0488b0ab0c84220b5e70c12fdb5a962443608092e148b7ecff2832311d7395209115e5cfec5e268
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/ferrumwizard.rb
CHANGED
@@ -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
|
17
|
+
sleep 3
|
18
18
|
|
19
|
-
|
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 =
|
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 =
|
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 =
|
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
metadata.gz.sig
CHANGED
Binary file
|