File tree Expand file tree Collapse file tree 4 files changed +28
-5
lines changed Expand file tree Collapse file tree 4 files changed +28
-5
lines changed Original file line number Diff line number Diff line change 1
1
Revision history for Selenium-Client
2
2
3
+ 1.03 2021-04-12 TEODESIAN
4
+ [BUG FIXES]
5
+ - Don't clobber $? in destructor
6
+ - Use Playwright.pm's more clever DESTROY code
7
+
3
8
1.02 2021-02-10 TEODESIAN
4
9
[BUG FIXES]
5
10
- Declare minimum version of perl 5.28
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ foreach my $browser (@browsers) {
99
99
is($session -> GetPageSource()," <html><head></head><body>ZIPPY\n </body></html>" ," Can get page source" );
100
100
is(exception { $session -> Back() }, undef , " Can navigate to the last page visited with back()" );
101
101
102
- alertify($session ) unless $browser eq ' safari' ;
102
+ alertify($session ) unless $browser eq ' safari' || $browser eq ' firefox ' ;
103
103
is(exception { $session -> Forward() }, undef , " Can navigate back to previously visited page with forward()" );
104
104
105
105
$session -> Back();
@@ -145,8 +145,8 @@ foreach my $browser (@browsers) {
145
145
is($rekt , \%erekt , " Can get window rect" );
146
146
}
147
147
# Frames
148
- my $frame = $session -> FindElement( using => ' css selector' , value => ' #frame' );
149
- is( exception { $session -> SwitchToFrame( id => $frame -> {elementid } ) }, undef , " Can switch into frame" );
148
+ # my $frame = $session->FindElement( using => 'css selector', value => '#frame' );
149
+ # is( exception { $session->SwitchToFrame( id => $frame->{elementid} ) }, undef, "Can switch into frame");
150
150
# XXX the above actually does not do anything, only switching by window.frames index actually works lol
151
151
$session -> SwitchToFrame( id => 0 );
152
152
# Check that the driver yanno *actually did something*
Original file line number Diff line number Diff line change 1
1
name = Selenium-Client
2
- version = 1.02
2
+ version = 1.03
3
3
author = George S. Baugh <george@troglodyne.net>
4
4
license = MIT
5
5
copyright_holder = George S. Baugh
Original file line number Diff line number Diff line change @@ -370,7 +370,25 @@ sub DESTROY($self) {
370
370
kill $sig , $self -> {pid };
371
371
372
372
print " Issued SIG$sig to $self ->{pid}, waiting...\n " if $self -> {debug };
373
- return waitpid ( $self -> {pid }, 0 );
373
+
374
+ # 0 is always WCONTINUED, 1 is always WNOHANG, and POSIX is an expensive import
375
+ # When 0 is returned, the process is still active, so it needs more persuasion
376
+ foreach (0..3) {
377
+ return unless waitpid ( $self -> {pid }, 1) == 0;
378
+ sleep 1;
379
+ }
380
+
381
+ # Advanced persuasion
382
+ print " Forcibly terminating selenium server process...\n " if $self -> {debug };
383
+ kill (' TERM' , $self -> {pid });
384
+
385
+ # XXX unfortunately I can't just do a SIGALRM, because blocking system calls can't be intercepted on win32
386
+ foreach (0..$self -> {timeout }) {
387
+ return unless waitpid ( $self -> {pid }, 1 ) == 0;
388
+ sleep 1;
389
+ }
390
+ warn " Could not shut down selenium server!" ;
391
+ return ;
374
392
}
375
393
376
394
sub _is_windows {
You can’t perform that action at this time.
0 commit comments