TT#56376 selenium: change timeout values

FirefoxExtensions.pm:
- Decrease element timeout to 5 seconds, but increase timeout on wait_for_text
and move_and_click to 10 seconds. This will allow both functions to execute
at least twice when the element is not found.

Change-Id: I82a6ea2325f2f5ae43f2ed39dd7f4b079cb2ec9c
changes/72/29972/2
Nico Schedel 6 years ago
parent b8a194a2ff
commit df2f8cf448

@ -30,7 +30,7 @@ sub BUILD {
# $self->set_window_position(0, 50) if ($browsername ne "htmlunit");
# $self->set_window_size($window_h,$window_w) if ($browsername ne "htmlunit");
# diag("Window size: $window_h x $window_w");
$self->set_timeout("implicit", 10_000);
$self->set_timeout("implicit", 5_000);
}
sub find_text {
@ -97,7 +97,7 @@ sub browser_name_in {
sub wait_for_text {
my ($self, $xpath, $expected, $timeout) = @_;
return unless $xpath && $expected;
$timeout = 5 unless $timeout; # seconds. Default timeout value if none is specified.
$timeout = 10 unless $timeout; # seconds. Default timeout value if none is specified.
my $started = time();
my $elapsed = time();
while ($elapsed - $started <= $timeout){
@ -112,7 +112,7 @@ sub wait_for_text {
sub move_and_click {
my ($self, $path, $type, $fallback, $timeout) = @_;
return unless $path && $type;
$timeout = 5 unless $timeout; # seconds. Default timeout value if none is specified.
$timeout = 10 unless $timeout; # seconds. Default timeout value if none is specified.
my $started = time();
my $elapsed = time();
while ($elapsed - $started <= $timeout){

Loading…
Cancel
Save