"*custom C:/path/to/ff/firefox.exe -no-remote -profile C:/selenium/firefox/custom_profile" #### sub wait_for_JS_function { my ($self, $func, $timeout) = @_; for (1 .. $timeout / 100) { my $res = $self->get_eval("typeof( window.$func )"); return $res if $res ne 'null'; $self->pause(100); } croak "Timed out waiting for JS func: '$func'"; } #### # Assumes only 1 currently opened window with target _blank sub select_target_blank_window { my ($self, $timeout) = @_; my $window_name; for (1 .. $timeout / 100) { ($window_name) = grep {/selenium_blank\d+/} $self->get_all_window_names; last if defined $window_name; $self->pause(100); } croak "Timed out waiting to select blank target window" if ! defined $window_name; return $self->select_window($window_name); } #### sub set_hidden_parameter { my ($self, $form, $elem, $val) = @_; my $javascript = "window.document.$form.$elem.value = " . '"' . $val . '";'; my $rc = $self->get_eval('$javascript'); return $rc; } #### $sel->type($loc, $val); $sel->fire_event($loc, 'onblur');