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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/browserfactory.rb +8 -7
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 409b833e7f3fa5bf6b2612efda7aefb49c2952fa
4
- data.tar.gz: 9075893157bc4833d04f504a3f5914f67bf4a3d3
3
+ metadata.gz: b80fcddc9f371e2bae32154d438f5efa866a35f1
4
+ data.tar.gz: a7fd2daf0f8e445e2f48eb3120922e2c5914ec64
5
5
  SHA512:
6
- metadata.gz: f03e5da072eba1901249ba7a85b63cdf5abab2ce53365ab1317a2ea22f9016b036cf7550c387604ebd1cbbb8c1fe21e25094ee43c76ca80ce29c155e9248ca4e
7
- data.tar.gz: 0171dec28dca3eb7ef59b38d80d291ff5985ed3c57299c2530b68cb09aa26775188bce48d33574a60822c78dcdf6456937585fdc387dfd812c2a7943f7f7ef06
6
+ metadata.gz: 5ff59f5ba2fb0e2639a063001be4ba349fd54157869416df7d637b63a4090f42326f634b33346f40c28117c35b9add5b1c4609acbbc6845f4d8887d69f5f9812
7
+ data.tar.gz: 88ddbb60e9033385698c14f3d7ba51178be2f070d1e94669d6f3bbe65f3ac233f5bae3c41bccb90afa86f022788b72c2b5ac5705070886644bf5b17c7df741f9
@@ -604,19 +604,19 @@ puts 'no'
604
604
  =end
605
605
 
606
606
  i = 0
607
- max = 30
608
- success = 0
609
- max_success_required = 10
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stealth_browser_automation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.32
4
+ version: 1.1.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi