Python Win32 send keystrokes to Chrome Python Win32 send keystrokes to Chrome google-chrome google-chrome

Python Win32 send keystrokes to Chrome


You can use this

import pyautoguipyautogui.hotkey('f5')

This will simulate your refresh key, sending the signal to chrome.
In case you don't want the chrome window to be made active, then when you START chrome, start it by typing this in the command prompt:

start /B chrome.exe

Then close chrome. It will run in the background. When the work is done, go Task Manager and close chrome.
OR you could go to Chrome>Advanced>System and see the first option.