Skip to main content

A couple of useful JS scripts for Selenium

# Tested with:
# https://github.com/ultrafunkamsterdam/undetected-chromedriver
# Python 3.9.13
# Windows 10

$pip install a-selenium-some-js

from a_selenium_some_js import *

execute_scripts_with_timeout(
        driver, script=f"window.scrollBy(0,{200})", script_timeout=3
    )
js_scrollby(driver, y=40, script_timeout=0)	
go_to_top_of_page(driver, script_timeout=1)
get_navigator_infos(driver)
zoom_website(driver, scaleFactor=2, x=0, y=0, relativeSpeed=800)

maximize_window(driver) # window is not maximized, but its size is like maximized

send_cmd(driver,'Input.synthesizePinchGesture', {
                        'x': 0,
                        'y': 0,
                        'scaleFactor': 2,
                        'relativeSpeed': 800, # optional
                        'gestureSourceType': 'default' # optional
                    }) # https://chromedevtools.github.io/devtools-protocol/
    
	

Metadata

Release files for a-selenium-some-js 0.10

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

Source distribution (sdist)

Source distribution for a-selenium-some-js 0.10
File Size Uploaded Provenance Actions
a_selenium_some_js-0.10.tar.gz 4.1 kB Without provenance Details for a_selenium_some_js-0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for a-selenium-some-js 0.10
File Interpreter ABI Platform Actions
a_selenium_some_js-0.10-py3-none-any.whl Python 3 none any Details for a_selenium_some_js-0.10-py3-none-any.whl

Total release size: 9.9 kB

Release files / a_selenium_some_js-0.10.tar.gz

Download URL a_selenium_some_js-0.10.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e648b9130bec39ee80a315e03f85dedf3bc08c4db804242597aef94523f6d078
BLAKE2b-256 checksum
How to use checksums
c485f29912f03b8d58076f78803ce750c976ba4660de03cbd23b6c2b6ccef965
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / a_selenium_some_js-0.10-py3-none-any.whl

Download URL a_selenium_some_js-0.10-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
67c49e9e184a2e25510405885a512ce8472effe5d85ebdf26cc029ba970f9f59
BLAKE2b-256 checksum
How to use checksums
cd260f362a9e1aff3a03cf99a30d4a57b4a420dd05c3f7bbc0a6ec434e81ca20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for a-selenium-some-js 0.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.10 This release

2 release files No provenance

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