Skip to content

Loading…

Send WWW::Selenium object to error_callback function #4

Merged
merged 1 commit into from

2 participants

@R3VoLuT1OneR

Send $self to the error_callback. You can use it for make screenshot or get location on error.

@lukec lukec merged commit 9e786cb into lukec:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 10, 2012
  1. @R3VoLuT1OneR
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/Test/WWW/Selenium.pm
View
6 lib/Test/WWW/Selenium.pm
@@ -129,7 +129,7 @@ sub AUTOLOAD {
no strict 'refs';
my $rc = $Test->$comparator( $self->$getter, $str, $name );
if (!$rc && $self->error_callback) {
- &{$self->error_callback}($name);
+ &{$self->error_callback}( $name, $self );
}
return $rc;
};
@@ -144,7 +144,7 @@ sub AUTOLOAD {
no strict 'refs';
my $rc = $Test->$comparator( $self->$getter($locator), $str, $name );
if (!$rc && $self->error_callback) {
- &{$self->error_callback}($name);
+ &{$self->error_callback}( $name, $self );
}
return $rc;
};
@@ -171,7 +171,7 @@ sub AUTOLOAD {
diag($@) if $@;
$rc = ok( $rc, $name );
if (!$rc && $self->error_callback) {
- &{$self->error_callback}($name);
+ &{$self->error_callback}( $name, $self );
}
return $rc;
};
Something went wrong with that request. Please try again.