Closed v8sharma closed 2 years ago
Thanks a lot @v8sharma I will try the solution from the link you share.
@atthaboon Thanks for the quick update, however the reason I removed my previous comment regarding the ExecutionFailed error was because I still ran into this issue after adding the exception instead of sys.exit(0). The CTRL+C signal is not being caught If I add Open Browser keyword before the for loop.
I did more digging and found that the issue is with the signal handler in the pyppeteer library. https://github.com/pyppeteer/pyppeteer/blob/6320c084e4586960a4622d7cfefd44c2dea108a5/pyppeteer/launcher.py#L158
If you have library import Puppeteer added then the test execution does not terminate gracefully after pressing CTRL+C once when running test case via command line.
Python: 3.7.4 Robot Framework: 4.1.2 RobotFramework-PuppeteerLibrary: 3.1.0
This seems to behave similar to bug reported in https://github.com/robotframework/robotframework/issues/3798
For example:
Open windows command prompt from test case location and run: "robot --outputdir C:/AutomationLogs --test TestSomething ."
Press CTRL+C once after test execution has started.
Observations: With PuppeteerLibrary import:
Without PuppeteerLibrary import: