Skip to content

Commit

Permalink
Issue #2889: Including waiting for autocomplete result to prevent tim…
Browse files Browse the repository at this point in the history
…ing bug.
  • Loading branch information
stefanhaerter committed Jan 26, 2024
1 parent 6eab899 commit 7efdf5b
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,13 @@ $Selenium->RunTest(
$Selenium->WaitFor(
JavaScript => "return \$.active == 0"
);
$Selenium->find_element( "#ui-id-1 > li > a", 'css' )->click();
$Selenium->find_element( "#QueueID_Search", 'css' )->send_keys('raw');
$Selenium->find_element( "#ui-id-1 > li > a", 'css' )->click();
$Selenium->find_element( "#QueueID_Search", 'css' )->send_keys('raw');

# to prevent timing problem, we wait until raw is the only visible option in Autocomplete
$Selenium->WaitFor(
JavaScript => 'return $("#QueueID_Select > ul").children(":visible").length == 1'
);
$Selenium->find_element( "#QueueID_Select", 'css' )->click();
$Selenium->find_element( "button[type='submit']", 'css' )->click();

Expand Down

0 comments on commit 7efdf5b

Please sign in to comment.