Skip to main content

browserctrl

Control the browser behavior automaticly.

Install

pip install browserctrl

Installed Commands and sub-commands

  • browserctrl
    • create-xlsx-template
    • run-xlsx-config

Usage

C:\Workspace\browserctrl>browserctrl --help
Usage: browserctrl [OPTIONS] COMMAND [ARGS]...

  Browser automation toolset.

Options:
  --help  Show this message and exit.

Commands:
  create-xlsx-template  Create a new xlsx file with command define...
  run-xlsx-config       Run browser automation commands defined in...

C:\Workspace\browserctrl>browserctrl create-xlsx-template --help
Usage: browserctrl create-xlsx-template [OPTIONS] [OUTPUT]

  Create a new xlsx file with command define template.

Options:
  --help  Show this message and exit.

C:\Workspace\browserctrl>browserctrl run-xlsx-config --help
Usage: browserctrl run-xlsx-config [OPTIONS] CONFIG_XLSX_PATH
                                   [VARIABLES_XLSX_PATH]

  Run browser automation commands defined in xlsx file.

Options:
  -l, --log TEXT              Log filename, default to browserctrl.log.
  -s, --sheet TEXT            Sheet name of config xlsx file. Default to the
                              active sheet.
  -v, --variables-sheet TEXT  Sheet name of variables xlsx file. Default to
                              the active sheet.
  -r, --repeat INTEGER        Repeat times to run. Default to 1 means run only
                              once.
  -d, --delay INTEGER         Seconds delay before the next browser instance
                              starts. Default to 5 seconds.
  --help                      Show this message and exit.


Examples

  1. Create a new xlsx template.
browserctrl create-xlsx-template my-task.xlsx
  1. Edit my-task.xlsx, add commands.
  2. Run commands in my-task.xlsx.
browserctrl run-xlsx-config my-task.xlsx
  1. If there are variables used in my-task.xlsx, write variables in variables.xlsx, and pass the filename to run command.
browserctrl run-xlsx-config my-task.xlsx variables.xslx

Variables xlsx file format.

name1 name2 name3
value11 value12 value13
value21 value22 value23
  • The first line must be variable names.
  • Every line is a group of variable values at the second line and lines below.
  • Every line of variable values will create a browser instance.

Other information

  1. See more help information in xlsx template which can be created by the sub-command create-xlsx-template.
  2. You have to install phantomjs, webdriver for chrome, firefox and ie by yourself.

Releases

v0.2.1 2020/06/01

  • Add documents.

v0.2.0 2020/06/01

  • Use xlsx variables file instead of yml variables file.

v0.1.4 2020/05/30

  • Add --no-sandbox option for chrome so that we can start chrome under root user.
  • Fix third counter problem in wait_and_monitoring.
  • Auto close browser after the instance is destroyed.

v0.1.3 2020/05/30

  • Fix variables problem in wait_and_monitoring.
  • Update document.

v0.1.2 2020/05/29

  • Add headless chrome browser support.
  • Fix second counter problem in wait_and_monitoring.
  • Fix screenshot problem creating empty folder.
  • Fix Ie Browser zoom level not 100% problem.
  • Ignore lines without operation.

v0.1.1 2020/05/29

  • Add instance_start_delay parameter for run_xlsx_config.
  • Add StreamHandler() for logging.
  • Update interval status before sleep in wait_and_monitoring.
  • Fix counter screenshot filename problem in wait_and_monitoring.

v0.1.0 2020/05/29

  • First release.

Release files for browserctrl 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for browserctrl 0.2.1
File Size Uploaded
browserctrl-0.2.1.tar.gz 19.2 kB Details

Release files / browserctrl-0.2.1.tar.gz

Download URL browserctrl-0.2.1.tar.gz
Size 19.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ac19f3552ca9f3ae11033450109bf13b230b029b0a5441b303b9b95cee7dabbb
BLAKE2b-256 checksum
How to use checksums
86ddf4676b32a7db67d9aae247a3ceb07a1694acf99851e3601ec2b25e2803d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file

0.2.0

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page