Console Input alternative to Dialogs 'Pause Execution' or '' Get Selection From User'

Hi,
Is anyone aware of a Keyword or library that has the ability to pause and request user input to the console during a Robot test? Like a press any key to continue.
The host I’m running Robot from has no gui so can’t display any of the Dialogs ‘Pause Execution’ or ‘’ Get Selection From User’ screen pops.

Unfortunately the testing requires an element of a user physically installing/removing hardware and I would like to pause the Robot test and print and request input to the console saying ‘Please do hardware install now - press key when completed to continue’. Once the hardware is installed and user presses a key, then the testing can continue.

Any thoughts or points in the right direction would be greatly appreciated.

Thanks,
Ollie.

Cant help for now but utilizing something like GitHub - Textualize/textual: Textual is a Rapid Application Development framework for Python. Build sophisticated user interfaces with a simple Python API. Run your apps in the terminal and (coming soon) a web browser! and re-implement or add secondary “backend” for Dialogs library would not take too long to implement =)

You could try (in a POSIX system):

*** Settings ***
Library    OperatingSystem

*** Keywords ***
Console Pause
    Run     echo -n "Press ENTER to continue... " && read ignore

(I don’t know if this input interaction works :wink:

Anyway, you could look to make a similar Python code.

2 Likes

Awesome, thanks! That seems to do the trick for a short term (probably forever) solution.

Many thanks :smiley:, I’ll take a look in to that as it seems pretty interesting if I could use that.

If you want something a bit more sophisticated, and something that works also on Windows, you can implement a keyword in Python and use the built-in input function.

2 Likes