Class to automate Chrome browser tasks using Playwright. It adds a class to deal with Microsoft Copilot
Project description
ong_chrome_automation
Automate Chrome browser tasks using Playwright, with special support for Microsoft Copilot interactions (work copilot, not personal copilot).
Features
- Launch and control a local Chrome browser using Playwright.
- Support for client certificates (PFX/PKCS12) for secure sites.
- Optional anti-detection (stealth) scripts.
- High-level automation for Microsoft Copilot web chat:
- Send messages and files.
- Retrieve responses as text, HTML, tables (pandas DataFrames), code blocks, and downloadable files.
- Example scripts for common Copilot automation tasks.
Requirements
- Python >= 3.11
- Google Chrome installed (default path:
C:/Program Files/Google/Chrome/Application/chrome.exe) - See
requirements.txtfor Python dependencies.
Installation
pip install -r requirements.txt
playwright install
Usage
Basic Chrome Automation
from ong_chrome_automation import LocalChromeBrowser
with LocalChromeBrowser() as browser:
browser.goto("https://example.com")
With Client Certificate
from ong_chrome_automation import LocalChromeBrowser
with LocalChromeBrowser(
origin="https://your-server.com",
pfxPath="./path/to/cert.pfx",
passphrase="your-password"
) as browser:
browser.goto("https://your-server.com")
Microsoft Copilot Automation
from ong_chrome_automation import LocalChromeBrowser, CopilotAutomation
with LocalChromeBrowser() as browser:
copilot = CopilotAutomation(browser)
copilot.chat("What is the capital of France?")
print(copilot.get_text_response())
Project Structure
- src/ong_chrome_automation/local_chrome_browser.py: Chrome browser automation class.
- src/ong_chrome_automation/playwright_copilot.py: High-level Copilot automation.
- requirements.txt: Python dependencies.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ong_chrome_automation-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ong_chrome_automation-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e3977d855f2f5c110c4736ffa1673fd917a2d0139f72504c0247dddf63933fa
|
|
| MD5 |
ccf61ead168b493545a8c5d2b28ee83d
|
|
| BLAKE2b-256 |
05e0cfd675767b78dd42721c942350c45384f642f9b787f4a28f56844df53473
|