stealth_browser_automation 1.1.30 → 1.1.31

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 +7 -7
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 651806b3656292c2ab94d0d5881306f49ebd0e66
4
- data.tar.gz: 70bafc7c768e14e127e76e0898f0103600507a52
3
+ metadata.gz: d082fe944c4ad48a19be6254853441e85f64a41c
4
+ data.tar.gz: 4961762eedb988c6c36c3c991f187f413a174c1a
5
5
  SHA512:
6
- metadata.gz: e423e27ee1c42b626f471afe44d56a4c976b7f8ccf22ef7fe9a9a0f72545b08bd2e5a920df0c4b048606f40f87569897ddf67815791294f345f983bf34533143
7
- data.tar.gz: f87e94c9d404a3f329614e5a293a17d88a00e88ab5dce020b3b3fa944d84ea84f9d9e78f76af987384ebd2001c754cab0ae18b0303be743ce0528528208d7f21
6
+ metadata.gz: 762a6bd971516651623fb84dc66b3b2f6f744f7c8c5ab61132267b23221af1870536d5b7479442d686418af47e79eea734b10fdd16140531df7f58146506eb3f
7
+ data.tar.gz: 3dd168f43758e6b0b1fc04497e2140ec9422657c104388c58ccc9e2efa9d280504cbef3182b91edbb894a372ca608d9250fb830a2c0d1482edddb28cd5584323
@@ -604,20 +604,20 @@ puts 'no'
604
604
  =end
605
605
 
606
606
  i = 0
607
- max = 3
608
- success = false
609
- while i<max && !success
607
+ max = 6
608
+ success = 0
609
+ max_success_required = 2
610
+ while i<max && success<max_success_required
610
611
  i+=1
611
612
  url = "http://127.0.0.1:#{BlackStack::StealthBrowserAutomation::Multilogin::mla_local_port}/api/v1/profile/stop?profileId=#{@@profile_name}"
612
613
  print "Api Call ##{i.to_s} to: #{url}... "
613
- sleep(50000)
614
614
  uri = URI.parse(url)
615
615
  body = Net::HTTP.get(uri)
616
616
  res = JSON.parse(body)
617
- success = true if res['status'].to_s == 'OK'
617
+ success += 1 if res['status'].to_s == 'OK'
618
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 !success
619
+ end # while i<max && && success<max_success_required
620
+ raise "Error requesting Mimic to stop (tried #{i.to_s} times)" if success<max_success_required
621
621
 
622
622
  else
623
623
  raise 'Cannot destroy browser due unknown browser type'
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.30
4
+ version: 1.1.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi