1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-25 15:23:08 +00:00

Tweak Cockpit 'Join Domain...' click

Always do the page-down thing, having it conditional just makes
things more complicated unnecessarily. Try up to 5 times to
click the link, because Cockpit sometimes redraws itself before
us identifying it and clicking on it, e.g.:
https://openqa.fedoraproject.org/tests/968422

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2021-09-03 10:12:26 -07:00
parent 02c47efab4
commit 5d6feb9808

View File

@ -31,17 +31,18 @@ sub run {
# check_type_string in cockpit because of that fucking constantly
# scrolling graph
start_cockpit(1);
# we may have to scroll down before the button is visible
if (check_screen "cockpit_join_domain_button", 5) {
click_lastmatch;
}
else {
# to activate the right pane
assert_and_click "cockpit_main";
send_key "pgdn";
# wait out scroll...
wait_still_screen 2;
# to activate the right pane
assert_and_click "cockpit_main";
send_key "pgdn";
# wait out scroll...
wait_still_screen 2;
# sometimes this click fails because CPU usage goes from one line
# to two at just the wrong moment and the link moves, so if it
# didn't work, try again a few times
my $count = 4;
while ($count > 0) {
assert_and_click "cockpit_join_domain_button", 5;
last if (check_screen "cockpit_join_domain", 30);
}
assert_screen "cockpit_join_domain";
type_string("\t\t", 4);