PyAutoEasy is a extension / wrapper around the famous PyAutoGUI, a cross-platform GUI automation tool to replace your boooring repetitive tasks.

Overview

PyAutoEasy

PyAutoEasy is a extension / wrapper around the famous PyAutoGUI, a cross-platform GUI automation tool to replace your boooring repetitive tasks.

When PyAutoGUI offers powerful ways to control keyboard and mouse movements, PyAutoEasy makes it super easy to grab the cursor positions on the screen and give meaningful names to them and generate the boilerplate program which we can easily modify to suit our needs.

How to install

Thanks to pip! its as simple as :

pip install --upgrade pip
pip install pyautoeasy

Example Usage

Step 1 : Generate initial code after grabbing the required locations in the screen

  1. Open a terminal / command prompt and run
pyautoeasy
  1. Move your cursor to the desired location and press alt+r in the keyboard to record the coordinates of a point in the screen.
  2. This opens up a dialog box, Now give a name to this point and click OK.
  3. Repeat the above 2 steps for all the cursor locations that you want to grab.
  4. Press alt+s to generate your initial automation script. (sample.py)

Step 2 : Modify the generated sample script to suit your needs.

Lets say you wanna create a login automation. Follow step 1 to record all desired locations in the screen like email field, password field, submit button etc. The generated sample program would look something like this.

from pyautoeasy import ScreenPoint

email_field = ScreenPoint(pos=(952, 309))
email_field.click_here()

password_field = ScreenPoint(pos=(934, 438))
password_field.click_here()

submit_button = ScreenPoint(pos=(1127, 597))
submit_button.click_here()

Now you can take above generated file and easily modify it to something like this. Super easy and intuitive!

from pyautoeasy import ScreenPoint

email_field = ScreenPoint(pos=(952, 309))
email_field.click_here()
email_field.type_here("[email protected]")

password_field = ScreenPoint(pos=(934, 438))
password_field.click_here()
password_field.type_here("[email protected]")

submit_button = ScreenPoint(pos=(1127, 597))
submit_button.click_here()

More about ScreenPoint

  • A ScreenPoint object represents a point in your screen with (x,y) cordinates specified in the pos argument in the constructor.

point1 = ScreenPoint(pos=(34, 78))

  • We can use the ScreenPoint object to move the curser there, click on that point, type something there, right click on that point etc. These operations can be done easily by using the following methods :
point1 = ScreenPoint(pos=(34, 78))
point1.click_here() # click on this point
point1.right_click_here() # right click on this point
point1.cursor_here() # move the cursor to this point
point1.type_here("text to type") # type something after selecting this point.
point1.double_click_here() # double click on this point
point1.triple_click_here() # triple click on this point
  • By default all the operations in ScreenPoint class is done after a delay of `ScreenPoint.Config.delay' (defaults to 1 second). We can change this property gloabally as follows

ScreenPoint.Config.delay = 0.5

  • Alternatively we can even have a delay specified at each operation by passing the argument after_sleeping_for.
point1 = ScreenPoint(pos=(34, 78))
point1.click_here(after_sleeping_for=0.5) # click on this point after a delay of 0.5 seconds
point1.right_click_here(after_sleeping_for=0) # right click on this point after a delay of 0 seconds.
  • type_here() method can take an optional argument enter=True which would press an enter key after typing the text. By default enter=True
Owner
Dingu Sagar
the Engineer
Dingu Sagar
A suite of benchmarks for CPU and GPU performance of the most popular high-performance libraries for Python :rocket:

A suite of benchmarks for CPU and GPU performance of the most popular high-performance libraries for Python :rocket:

Dion Hรคfner 255 Jan 04, 2023
Data-Driven Tests for Python Unittest

DDT (Data-Driven Tests) allows you to multiply one test case by running it with different test data, and make it appear as multiple test cases. Instal

424 Nov 28, 2022
Switch among Guest VMs organized by Resource Pool

Proxmox PCI Switcher Switch among Guest VMs organized by Resource Pool. main features: ONE GPU card, N OS (at once) Guest VM command client Handler po

Rosiney Gomes Pereira 111 Dec 27, 2022
pytest splinter and selenium integration for anyone interested in browser interaction in tests

Splinter plugin for the pytest runner Install pytest-splinter pip install pytest-splinter Features The plugin provides a set of fixtures to use splin

pytest-dev 238 Nov 14, 2022
This file will contain a series of Python functions that use the Selenium library to search for elements in a web page while logging everything into a file

element_search with Selenium (Now With docstrings ๐Ÿ˜Ž ) Just to mention, I'm a beginner to all this, so it it's very possible to make some mistakes The

2 Aug 12, 2021
An AWS Pentesting tool that lets you use one-liner commands to backdoor an AWS account's resources with a rogue AWS account - or share the resources with the entire internet ๐Ÿ˜ˆ

An AWS Pentesting tool that lets you use one-liner commands to backdoor an AWS account's resources with a rogue AWS account - or share the resources with the entire internet ๐Ÿ˜ˆ

Brandon Galbraith 276 Mar 03, 2021
A toolbar overlay for debugging Flask applications

Flask Debug-toolbar This is a port of the excellent django-debug-toolbar for Flask applications. Installation Installing is simple with pip: $ pip ins

863 Dec 29, 2022
A grab-bag of nifty pytest plugins

A goody-bag of nifty plugins for pytest OS Build Coverage Plugin Description Supported OS pytest-server-fixtures Extensible server-running framework w

Man Group 492 Jan 03, 2023
์ž๋™ ๊ฑด๊ฐ•์ƒํƒœ ์ž๊ฐ€์ง„๋‹จ ๋ฉ”ํฌ๋กœ ์„œ๋ฒ„์ „์šฉ

Auto-Self-Diagnosis-for-server ์ž๋™ ์ž๊ฐ€์ง„๋‹จ ๋ฉ”ํฌ๋กœ ์„œ๋ฒ„์ „์šฉ ์ด ํ”„๋กœ๊ทธ๋žจ์€ SaidBySolo๋‹˜์˜ auto-self-diagnosis๋ฅผ ์ฐธ๊ณ ํ•˜์—ฌ ์ œ์ž‘ํ•˜์˜€์Šต๋‹ˆ๋‹ค. ๊ฐœ์ธ ์‚ฌ์šฉ ๋ชฉ์ ์œผ๋กœ ์ œ์ž‘ํ•˜์˜€๊ธฐ ๋•Œ๋ฌธ์— ์ถ”ํ›„ ์—…๋ฐ์ดํŠธ๋Š” ์ง„ํ–‰ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์˜์กด์„ฑ G

JJooni 3 Dec 04, 2021
Python drivers for YeeNet firmware

yeenet-router-driver-python Python drivers for YeeNet firmware This repo is under heavy development. Many or all of these scripts are not likely to wo

Jason Paximadas 1 Dec 26, 2021
Useful additions to Django's default TestCase

django-test-plus Useful additions to Django's default TestCase from REVSYS Rationale Let's face it, writing tests isn't always fun. Part of the reason

REVSYS 546 Dec 22, 2022
py.test fixture for benchmarking code

Overview docs tests package A pytest fixture for benchmarking code. It will group the tests into rounds that are calibrated to the chosen timer. See c

Ionel Cristian Mฤƒrieศ™ 1k Jan 03, 2023
WrightEagle AutoTest (Has been updated by Cyrus team members)

Autotest2d WrightEagle AutoTest (Has been updated by Cyrus team members) Thanks go to WrightEagle Members. Steps 1- prepare start_team file. In this s

Cyrus Soccer Simulation 2D Team 3 Sep 01, 2022
Obsei is a low code AI powered automation tool.

Obsei is a low code AI powered automation tool. It can be used in various business flows like social listening, AI based alerting, brand image analysis, comparative study and more .

Obsei 782 Dec 31, 2022
Faker is a Python package that generates fake data for you.

Faker is a Python package that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in yo

Daniele Faraglia 15.2k Jan 01, 2023
BDD library for the py.test runner

BDD library for the py.test runner pytest-bdd implements a subset of the Gherkin language to enable automating project requirements testing and to fac

pytest-dev 1.1k Jan 09, 2023
Aioresponses is a helper for mock/fake web requests in python aiohttp package.

aioresponses Aioresponses is a helper to mock/fake web requests in python aiohttp package. For requests module there are a lot of packages that help u

402 Jan 06, 2023
This project demonstrates selenium's ability to extract files from a website.

This project demonstrates selenium's ability to extract files from a website. I've added the challenge of connecting over TOR. This package also includes a personal archive site built in NodeJS and A

2 Jan 16, 2022
Yet another python home automation project. Because a smart light is more than just on or off

Automate home Yet another home automation project because a smart light is more than just on or off. Overview When talking about home automation there

Maja Massarini 62 Oct 10, 2022
AllPairs is an open source test combinations generator written in Python

AllPairs is an open source test combinations generator written in Python

Robson Agapito Correa 5 Mar 05, 2022