mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-12-22 02:38:31 +00:00
Change the order of steps and add another check screen.
Since GDM shows the "system-menu-button", it could not correctly switch users on a locked screen. I added a check to see if we are on a locked screen and behave accordingly.
This commit is contained in:
parent
23904d71b2
commit
fd3e4e3280
15
needles/gnome/locked_screen_switch_user-20200422.json
Normal file
15
needles/gnome/locked_screen_switch_user-20200422.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"locked_screen_switch_user"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 964,
|
||||
"ypos": 709,
|
||||
"width": 21,
|
||||
"height": 19,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/locked_screen_switch_user-20200422.png
Normal file
BIN
needles/gnome/locked_screen_switch_user-20200422.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 63 KiB |
@ -139,7 +139,11 @@ sub logout_user {
|
||||
sub switch_user {
|
||||
# Switch the user, i.e. leave the current user logged in and
|
||||
# log in another user simultaneously.
|
||||
if (check_screen "system_menu_button") {
|
||||
send_key "ret";
|
||||
if (check_screen "locked_screen_switch_user") {
|
||||
assert_and_click "locked_screen_switch_user";
|
||||
}
|
||||
elsif (check_screen "system_menu_button") {
|
||||
# The system_menu_button indicates that we are in an active
|
||||
# and unlocked session, where user switching differs
|
||||
# from a locked but active session.
|
||||
@ -150,10 +154,6 @@ sub switch_user {
|
||||
# Add sleep to slow down the process a bit
|
||||
sleep 10;
|
||||
}
|
||||
else {
|
||||
# When the screen is locked, use the icon.
|
||||
assert_and_click "locked_screen_switch_user";
|
||||
}
|
||||
}
|
||||
|
||||
sub reboot_system {
|
||||
|
Loading…
Reference in New Issue
Block a user