Questions tagged [pyautogui]

PyAutoGUI is a versatile Python module that can be utilized on multiple operating systems to automate GUI tasks by controlling the mouse and keyboard through code.

Is there a way to navigate my mouse across a webpage using Selenium (or a different webdriver) using specific x and y coordinates?

while True: cursorx, cursory = pyautogui.position() body = driver.find_element_by_css_selector("body") actions.move_to_element_with_offset(body, cursorx, cursory) Is it possible to programmatically move the mouse on a website without ...

Attempting to have my Python script execute a click on a button only if a specific condition is not met

Upon meeting the condition, a click is currently triggered. For example: The code scans for a specific word on my screen and compares it to predefined data set. Expected behavior: If the screen is empty, a click should happen. If the word "cookie" app ...

What is the best way to operate multiple individual browsers simultaneously, each with its own distinct mouse cursor?

My goal is to have my application execute multiple automated processes across different web browsers simultaneously, with a focus on simulating mouse movements in each browser concurrently. I'm uncertain about how to accomplish this. I've explored various ...

"Attempting to use Python's pyautogui for controlling Windows 11 with the control + shift + left

I'm attempting to switch the current window to a second monitor using a key combination, but for some reason it's not working and I can't figure out why. Here is what I have tried: pyautogui.keyDown("win") pyautogui.keyDown(" ...

What is pyautogui's reasoning behind incorporating its own key delay in the write() function?

I have a code snippet for sending keys via pyautogui: pyautogui.write(df["description"].iloc[0]) The HTML element df["description"].iloc[0] is fetched from a CSV file and looks like this: <div class="post-body entry-con ...

Unable to retrieve the keyboard key from the variable

I am currently working on a program that is designed to automatically press keyboard keys, but I am facing some issues. The program seems to have trouble understanding the key value obtained from Tkinter Entry. When attempting to use pynput to press the k ...

Selenium Python encounters a stale element issue after downloading a file

Having an issue with downloading videos after clicking a link. The process works fine for the first page, but encounters an error when trying to download from a new page opened by a second link. The error message states that the element went stale during ...