AutoCore Documentation¶
Introduction¶
AutoCore¶
Automate Core Actions
A Python library that combines GUI automation, headless browser control and common actions into a single library.
With a single import, we get everything we need to automate repetitive tasks on Windows and Linux, no juggling multiple libraries or complex setup.
Security & Privacy¶
AutoCore runs entirely on your local machine. No data is sent to any external server at any point.
This makes it suitable for:
On-premise deployments with strict data security policies.
Automation involving sensitive or confidential data.
Compliance-sensitive industries like finance, healthcare and legal.
Platform Support¶
Supported: Windows, Linux
Not Supported: macOS
Functions¶
Function |
Description |
|---|---|
|
Open Chrome browser and navigate to URL |
|
Click on image, text, coordinates, color or web element |
|
Right-click on image, text, coordinates, color or web element |
|
Copy text from active window, clipboard, coordinates or web element |
|
Convert CSV file to XLSX |
|
Current day of month (1-31) |
|
Current day of week (monday, tuesday, …) |
|
Drag from source to target |
|
Select item from a dropdown |
|
Clear text from input fields |
|
Find text in browser using Ctrl+F |
|
Recursively find all values of a key in nested data |
|
Extract substring between two markers |
|
Current hour (0-23) |
|
GUI tool to inspect pixel position and color (Windows only) |
|
Setup logging with terminal color status |
|
Current minute (0-59) |
|
Current month (1-12) |
|
Press keyboard keys |
|
Read text from screen or browser via OCR or extract text from files |
|
Run a file or application |
|
Speak text using offline Text-to-Speech |
|
Take a screenshot of full screen or region |
|
Scroll up, down, to top or to bottom |
|
Current second (0-59) |
|
Wait with countdown, wait for element or wait for color |
|
Monitor downloads folder for completion or fetch via URL |
|
List, focus, close, minimize, maximize, resize or move windows |
|
Type text in active window or web element |
|
Current year |
|
Zoom in/out by steps or set zoom percentage |
File Formats Supported by read()¶
Category |
Formats |
|---|---|
Documents |
PDF, DOCX, PPTX, ODT, RTF |
Tabular |
CSV, TSV, XLSX, SQLite |
Structured |
JSON, YAML, XML, INI/CFG |
Text |
TXT, LOG, MD |
Web |
HTML |
EML, MSG |
|
eBooks |
EPUB |
Scripts |
SH, BAT, PY |
Quick Example¶
from autocore import *
log_setup("demo")
# Open login page in visible browser
dr = browser('https://practice.expandtesting.com/login')
# Open login page in headless browser
# dr = browser('https://practice.expandtesting.com/login', True)
# Scroll to the login form
find_browser(dr, 'secure area')
scroll(dr, 1)
# Login with test credentials
write(dr, 'id', 'username', 'practice')
write(dr, 'id', 'password', 'SuperSecretPassword!')
wait(2)
click(dr, 'id', 'submit-login')
wait(5)
# doing logout
click(dr, 'text', 'Logout')
wait(2)
print("Logout done.")
# showing blank page before moving to next website
dr.get("about:blank")
#====================================================
# Navigate to secure file download page
dr.get('https://practice.expandtesting.com/download')
# Scroll to bottom to make the link visible
scroll(dr, 'bottom')
# Click to download the test file
click(dr, 'text', 'some-file.json')
# Wait for download to finish with timeout of 2 mins
file_location = wait_download(120)
# Announce completion time with voice
say(f"File downloaded at {hour()} hours and {minute()} minutes")
# Closing the browser
dr.quit()
print("Content of downloaded file is : ", read(file_location))
print('bye bye')