stealth_browser_automation 1.1.32 → 1.1.37
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 +8 -7
- 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: b80fcddc9f371e2bae32154d438f5efa866a35f1
|
4
|
+
data.tar.gz: a7fd2daf0f8e445e2f48eb3120922e2c5914ec64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ff59f5ba2fb0e2639a063001be4ba349fd54157869416df7d637b63a4090f42326f634b33346f40c28117c35b9add5b1c4609acbbc6845f4d8887d69f5f9812
|
7
|
+
data.tar.gz: 88ddbb60e9033385698c14f3d7ba51178be2f070d1e94669d6f3bbe65f3ac233f5bae3c41bccb90afa86f022788b72c2b5ac5705070886644bf5b17c7df741f9
|
data/lib/browserfactory.rb
CHANGED
@@ -604,19 +604,19 @@ puts 'no'
|
|
604
604
|
=end
|
605
605
|
|
606
606
|
i = 0
|
607
|
-
max =
|
608
|
-
success = 0
|
609
|
-
max_success_required =
|
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
610
|
while i<max && success<max_success_required
|
611
|
-
puts ''
|
611
|
+
#puts ''
|
612
612
|
i+=1
|
613
613
|
url = "http://127.0.0.1:#{BlackStack::StealthBrowserAutomation::Multilogin::mla_local_port}/api/v1/profile/stop?profileId=#{@@profile_name}"
|
614
|
-
print "Api Call ##{i.to_s} to: #{url}... "
|
614
|
+
#print "Api Call ##{i.to_s} to: #{url}... "
|
615
615
|
uri = URI.parse(url)
|
616
616
|
body = Net::HTTP.get(uri)
|
617
617
|
res = JSON.parse(body)
|
618
618
|
success += 1 if res['status'].to_s == 'OK'
|
619
|
-
puts "response: #{res['status'].to_s}"
|
619
|
+
#puts "response: #{res['status'].to_s}"
|
620
620
|
end # while i<max && && success<max_success_required
|
621
621
|
raise "Error requesting Mimic to stop (tried #{i.to_s} times)" if success<max_success_required
|
622
622
|
|
@@ -660,7 +660,7 @@ puts "response: #{res['status'].to_s}"
|
|
660
660
|
end
|
661
661
|
|
662
662
|
# Launch a Mimic browser.
|
663
|
-
def self.mimic(mimic_profile_id)
|
663
|
+
def self.mimic(mimic_profile_id, load_timeout=DEFAULT_LOAD_TIMEOUT)
|
664
664
|
#
|
665
665
|
@@type = BlackStack::BrowserFactory::TYPE_MIMIC
|
666
666
|
@@profile_name = mimic_profile_id
|
@@ -714,6 +714,7 @@ puts "response: #{res['status'].to_s}"
|
|
714
714
|
# http.request(req_2)
|
715
715
|
#}
|
716
716
|
@@driver = Selenium::WebDriver.for(:remote, :url => url_2)
|
717
|
+
@@driver.manage.timeouts.page_load = load_timeout
|
717
718
|
#bridge = @@driver.instance_variable_get(:@bridge)
|
718
719
|
#service = bridge.instance_variable_get(:@service)
|
719
720
|
#process = service.instance_variable_get(:@process)
|