A simple selenium wrapper for ServiceNow
Project description
ServiceNow Selenium Wrapper
A simple selenium wrapper designed for interaction with ServiceNow. This package simplifies logging in, managing alerts, and interacting with shadow elements within the ServiceNow environment.
Installation
To install the package, use pip:
pip install servicenow-selenium
Usage
Initialize the ServiceNowSelenium class by providing the URL, username, and password:
from servicenow_selenium import ServiceNowSelenium
selenium_wrapper = ServiceNowSelenium(url="YOUR_SERVICENOW_URL", username="YOUR_USERNAME", password="YOUR_PASSWORD")
Key Features:
-
Login: Easily log into ServiceNow:
selenium_wrapper.login()
-
Logout: Log out and quit the driver:
selenium_wrapper.logout(user_menu_path="JS_PATH_HERE", logout_path="JS_PATH_HERE")
-
Interact with Shadow DOM Elements: Click shadow elements using JS path:
selenium_wrapper.click_shadow_element(errorName="element name for error reference", js_path="JS_PATH_HERE")
Note: The provided JS path must contain "return" to correctly fetch the element. For instance,
return document.querySelector(...)
-
Check for Element Presence: Determine if an element is present using its JS path:
is_present = selenium_wrapper.is_element_present(js_path="JS_PATH_HERE")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for servicenow_selenium-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29e43f20da26c31d322229697de9e8b3fe7212cb955d0628b89f728dc38cef61 |
|
MD5 | d603783187d815b27b1a7cf2cf70a069 |
|
BLAKE2b-256 | 6a3d54e4525532109c33343e9831d505931283633a778bf9e2dd9159a3adfb78 |