stealth_browser_automation 1.1.25 → 1.1.26

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 +15 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f38926d28e0432ca3b7cc915917f61c4c3cb195
4
- data.tar.gz: 85bf072c269c336be834287110b33adb0a51742b
3
+ metadata.gz: 3d9cfbadc98d58e0115fa2b5e6dab39732a36a64
4
+ data.tar.gz: 9047f3a14290b6a6d9bccf3aa491de7fc795f5d3
5
5
  SHA512:
6
- metadata.gz: e8797630080f9de87c4e5dd0041e0410cb3d1c0c2d4df626912c961bb56edcc3dbb2e5ead9457aed27184a9d3fd564d0e4247e5bee649c26dddbc90201c193fc
7
- data.tar.gz: 9db19bed23e1798d3462bcf9608d600beaab60bb72f7918f5a7508fbee709673626eeb30b6b72f8d4dc7e5a2f0e2df04412a9d188c667f53621a134fc6520b61
6
+ metadata.gz: 1f9606883aeac31c85feccb1e6f8736bf46da9b815df6c6b6ea5edf65a8c39d5a975abb637c70c8f2a34080f39f072f1f01f72ca3631ce64e97bb5a2fe05627f
7
+ data.tar.gz: 2b3c4bd13546da1afac003d5b2f4d382c9100cb80e922737821a55ca881f58fc6921d1860640a06b0275774a59387acd28d0ffeea9bb0b2183a2bfe3b1318af8
@@ -566,9 +566,19 @@ module BlackStack
566
566
  end
567
567
 
568
568
  elsif @@type == BlackStack::BrowserFactory::TYPE_MIMIC
569
+ puts ''
569
570
  begin
570
- #@@browser.close if !@@browser.nil?
571
- rescue
571
+ print 'Close browser?... '
572
+ if !@@browser.nil?
573
+ puts 'yes'
574
+ print 'Close browser... '
575
+ @@browser.close
576
+ puts 'done'
577
+ else
578
+ puts 'no'
579
+ end
580
+ rescue => e
581
+ puts "error: #{e.to_s}"
572
582
  end
573
583
  =begin
574
584
  begin
@@ -583,14 +593,16 @@ module BlackStack
583
593
  success = false
584
594
  while i<max && !success
585
595
  i+=1
596
+ print "Api Call #{i.to_s}... "
586
597
  url = "http://127.0.0.1:#{BlackStack::StealthBrowserAutomation::Multilogin::mla_local_port}/api/v1/profile/stop?profileId=#{@@profile_name}"
587
598
  uri = URI.parse(url)
588
599
  body = Net::HTTP.get(uri)
589
600
  res = JSON.parse(body)
590
601
  success = true if res['status'].to_s == 'OK'
602
+ puts "response: #{res['status'].to_s}"
591
603
  end # while i<max
592
604
  raise "Error requesting Mimic to stop (tried #{i.to_s} times)" if !success
593
-
605
+
594
606
  else
595
607
  raise 'Cannot destroy browser due unknown browser type'
596
608
  end
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.25
4
+ version: 1.1.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi