| 12345678910111213141516171819 |
- use strict;
- use warnings;
- use Selenium::Chrome;
- use Test::More tests => 3;
- use Test::Fatal;
- my $driver;
- is( exception { $driver = Selenium::Chrome->new(); }, undef, "can spawn new Selenium::Chrome");
- my $port = $driver->port();
- is( exception { $driver->shutdown_binary; }, undef, "can shutdown binary correctly");
- sleep 2;
- my $cmd = "lsof -t -i :$port";
- my $pid = `$cmd`;
- chomp $pid;
- is($pid,'',"Destructor appears to have run shutdown_binary and whacked the driver process");
|