diff --git a/test/verify/check-pages b/test/verify/check-pages index add6cfd72dee..8f396ab2a8f2 100755 --- a/test/verify/check-pages +++ b/test/verify/check-pages @@ -299,8 +299,7 @@ OnCalendar=daily # b.wait_visible(".terminal .xterm-accessibility-tree") # b.wait_in_text(line_sel(1), "admin") - # b.input_text("echo $LANG") - # b.key("Enter") + # b.input_text("echo $LANG\n") # b.wait_in_text(line_sel(2), locale) b.switch_to_top() diff --git a/test/verify/check-selinux b/test/verify/check-selinux index 407c5148df46..95005594ae90 100755 --- a/test/verify/check-selinux +++ b/test/verify/check-selinux @@ -272,8 +272,7 @@ class TestSelinux(testlib.MachineCase): b.go("/system/terminal") b.enter_page("/system/terminal") b.focus('.terminal') - b.input_text('"') - b.key("Enter") + b.input_text('"\n') # Right click and paste b.mouse(".terminal", "contextmenu", btn=2) b.click('.contextMenu li:nth-child(2) button') diff --git a/test/verify/check-shell-active-pages b/test/verify/check-shell-active-pages index e0cf321217c6..70789441fe4d 100755 --- a/test/verify/check-shell-active-pages +++ b/test/verify/check-shell-active-pages @@ -68,8 +68,7 @@ class TestActivePages(testlib.MachineCase): b.wait_in_text(line_sel(1), '$') # run a command that we can easily identify, and which will die with the terminal - b.input_text("bash -c 'exec -a kitten cat'") - b.key("Enter") + b.input_text("bash -c 'exec -a kitten cat'\n") # wait for command to run m.execute("until pgrep -afx kitten; do sleep 1; done") diff --git a/test/verify/check-system-realms b/test/verify/check-system-realms index ab48932d6b39..151ff23f8052 100755 --- a/test/verify/check-system-realms +++ b/test/verify/check-system-realms @@ -754,8 +754,7 @@ ipa-advise enable-admins-sudo | sh -ex b.open("/system/terminal") b.enter_page("/system/terminal") b.wait_in_text(".terminal .xterm-accessibility-tree", "alice") - b.input_text("klist") - b.key("Enter") + b.input_text("klist\n") b.wait_in_text(".terminal .xterm-accessibility-tree", "Ticket cache: FILE:/run/user") b.wait_in_text(".terminal .xterm-accessibility-tree", "Default principal: alice@COCKPIT.LAN") b.wait_in_text(".terminal .xterm-accessibility-tree", "for client HTTP/x0.cockpit.lan@COCKPIT.LAN") @@ -1057,8 +1056,7 @@ class TestKerberos(testlib.MachineCase): b.enter_page("/system/terminal") # wait for prompt b.wait_in_text(".terminal .xterm-accessibility-tree", "admin") - b.input_text("klist") - b.key("Enter") + b.input_text("klist\n") b.wait_in_text(".terminal .xterm-accessibility-tree", "Ticket cache") b.wait_in_text(".terminal .xterm-accessibility-tree", "Default principal: admin@COCKPIT.LAN") b.wait_in_text(".terminal .xterm-accessibility-tree", "krbtgt/COCKPIT.LAN") diff --git a/test/verify/check-system-terminal b/test/verify/check-system-terminal index 7a322f8ba0ac..0d973714c550 100755 --- a/test/verify/check-system-terminal +++ b/test/verify/check-system-terminal @@ -84,22 +84,19 @@ PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/ self.assertIn("~]$", prompt) # Run some commands - b.input_text("whoami") - b.key("Enter") + b.input_text("whoami\n") wait_line(n + 1, "admin") wait_line(n + 2, prompt) - b.input_text('echo -e "1\\u0041"') - b.key("Enter") + b.input_text('echo -e "1\\u0041"\n') wait_line(n + 3, '1A') # The '@' sign is in the default prompt b.wait_in_text(".terminal-title", '@') # output flooding - b.input_text("seq 1000000") - b.key("Enter") + b.input_text("seq 1000000\n") with b.wait_timeout(300): b.wait_in_text(".terminal .xterm-accessibility-tree", "9999989999991000000admin@") @@ -114,8 +111,7 @@ PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/ self.assertNotIn('admin', b.text(line_sel(n + 1))) # Check that when we `exit` we can still reconnect with the 'Reset' button - b.input_text("exit") - b.key("Enter") + b.input_text("exit\n") b.wait_in_text(".terminal .xterm-accessibility-tree", "disconnected") b.click('button:contains("Reset")') wait_line(n, prompt) @@ -139,8 +135,7 @@ PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/ # Execute command wait_line(n, prompt) - b.input_text('echo "XYZ"') - b.key("Enter") + b.input_text('echo "XYZ"\n') echo_result_line = n + 1 wait_line(echo_result_line, "XYZ") @@ -173,8 +168,7 @@ PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/ # Execute another command wait_line(n, prompt) - b.input_text('echo "foo"') - b.key("Enter") + b.input_text('echo "foo"\n') echo_result_line = n + 1 wait_line(echo_result_line, "foo") @@ -192,10 +186,8 @@ PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/ # check that we get a sensible $PATH; this varies across OSes, so don't be too strict about it b.key("Enter") - b.input_text('clear') - b.key("Enter") - b.input_text("echo $PATH > /tmp/path") - b.key("Enter") + b.input_text('clear\n') + b.input_text("echo $PATH > /tmp/path\n") # don't use wait_line() for the full match here, as line breaks get in the way; just wait until command has run wait_line(echo_result_line, prompt) path = m.execute("cat /tmp/path").strip() @@ -266,8 +258,7 @@ PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/ # execute a command we can see the effect of b.wait_js_cond("ph_text('.terminal').indexOf('uid=') == -1") - b.input_text("id") - b.key("Enter") + b.input_text("id\n") b.wait_js_cond("ph_text('.terminal').indexOf('uid=') >= 0")