stealth_browser_automation 1.1.30 → 1.1.35
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/browserfactory.rb +11 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 055ff58dce3c049fe52ab8d3395688e47a00a14d
|
4
|
+
data.tar.gz: 5cc37aa89eb0171739ff1feb9d25c641cbe07fc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b30a67266ea2be4a46d0aa3ace375613438c0b712aecf22f516c499e412f27ec8f137d865df21faa10dbc35632e5e8fde8e00dc072e14c61531bfa333405d600
|
7
|
+
data.tar.gz: 294363052d2dd77dc1de78cdf0a354c12a65880c93bc1f22084dd6f476ea3adf5b1c0a8bad6046480dc5c93e4107a34a3b8c4e7d1f0101bd73095c8206792b6b
|
data/lib/browserfactory.rb
CHANGED
@@ -604,20 +604,21 @@ puts 'no'
|
|
604
604
|
=end
|
605
605
|
|
606
606
|
i = 0
|
607
|
-
max =
|
608
|
-
success =
|
609
|
-
|
607
|
+
max = 90
|
608
|
+
success = 0 # I have to call this access point many times to get the browser closed.
|
609
|
+
max_success_required = 30
|
610
|
+
while i<max && success<max_success_required
|
611
|
+
#puts ''
|
610
612
|
i+=1
|
611
613
|
url = "http://127.0.0.1:#{BlackStack::StealthBrowserAutomation::Multilogin::mla_local_port}/api/v1/profile/stop?profileId=#{@@profile_name}"
|
612
|
-
print "Api Call ##{i.to_s} to: #{url}... "
|
613
|
-
sleep(50000)
|
614
|
+
#print "Api Call ##{i.to_s} to: #{url}... "
|
614
615
|
uri = URI.parse(url)
|
615
616
|
body = Net::HTTP.get(uri)
|
616
617
|
res = JSON.parse(body)
|
617
|
-
success
|
618
|
-
puts "response: #{res['status'].to_s}"
|
619
|
-
end # while i<max
|
620
|
-
raise "Error requesting Mimic to stop (tried #{i.to_s} times)" if
|
618
|
+
success += 1 if res['status'].to_s == 'OK'
|
619
|
+
#puts "response: #{res['status'].to_s}"
|
620
|
+
end # while i<max && && success<max_success_required
|
621
|
+
raise "Error requesting Mimic to stop (tried #{i.to_s} times)" if success<max_success_required
|
621
622
|
|
622
623
|
else
|
623
624
|
raise 'Cannot destroy browser due unknown browser type'
|
@@ -713,6 +714,7 @@ puts "response: #{res['status'].to_s}"
|
|
713
714
|
# http.request(req_2)
|
714
715
|
#}
|
715
716
|
@@driver = Selenium::WebDriver.for(:remote, :url => url_2)
|
717
|
+
@@driver.manage.timeouts.page_load = 360
|
716
718
|
#bridge = @@driver.instance_variable_get(:@bridge)
|
717
719
|
#service = bridge.instance_variable_get(:@service)
|
718
720
|
#process = service.instance_variable_get(:@process)
|