stealth_browser_automation 1.1.30 → 1.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/browserfactory.rb +11 -9
  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: 055ff58dce3c049fe52ab8d3395688e47a00a14d
4
+ data.tar.gz: 5cc37aa89eb0171739ff1feb9d25c641cbe07fc3
5
5
  SHA512:
6
- metadata.gz: e423e27ee1c42b626f471afe44d56a4c976b7f8ccf22ef7fe9a9a0f72545b08bd2e5a920df0c4b048606f40f87569897ddf67815791294f345f983bf34533143
7
- data.tar.gz: f87e94c9d404a3f329614e5a293a17d88a00e88ab5dce020b3b3fa944d84ea84f9d9e78f76af987384ebd2001c754cab0ae18b0303be743ce0528528208d7f21
6
+ metadata.gz: b30a67266ea2be4a46d0aa3ace375613438c0b712aecf22f516c499e412f27ec8f137d865df21faa10dbc35632e5e8fde8e00dc072e14c61531bfa333405d600
7
+ data.tar.gz: 294363052d2dd77dc1de78cdf0a354c12a65880c93bc1f22084dd6f476ea3adf5b1c0a8bad6046480dc5c93e4107a34a3b8c4e7d1f0101bd73095c8206792b6b
@@ -604,20 +604,21 @@ puts 'no'
604
604
  =end
605
605
 
606
606
  i = 0
607
- max = 3
608
- success = false
609
- while i<max && !success
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 = true if res['status'].to_s == 'OK'
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
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)
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.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi