# Press the physical Escape key in tests

**URL:** <https://forum.robotframework.org/t/press-the-physical-escape-key-in-tests/8992>\
**Category:** Libraries\
**Created:** [19 June 2025 11:46 UTC](https://forum.robotframework.org/t/press-the-physical-escape-key-in-tests/8992 "2025-06-19T11:46:47Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![RysZ](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/rysz/32/4570_2.png) [@RysZ](https://forum.robotframework.org/u/RysZ)\
**Post date:** [25 June 2025 08:15 UTC](https://forum.robotframework.org/t/press-the-physical-escape-key-in-tests/8992/3 "2025-06-25T08:15:25Z")

</div>

Hi,  
For ESC key, have you tried simple?

import pyautogui  
pyautogui.press(‘esc’)

Works for win file pickers.

In case of the inupt, and what @damies13 wrote, seek for Execute JS solution, that will disable native window opening after click, maybe this [thread](https://forum.robotframework.org/t/need-help-automating-file-upload-without-input-tag/8572/3) will help.

---

_[View the full topic](https://forum.robotframework.org/t/press-the-physical-escape-key-in-tests/8992)._
