Skip to main content

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:

  1. Login: Easily log into ServiceNow:

    selenium_wrapper.login()
    
  2. Logout: Log out and quit the driver:

    selenium_wrapper.logout(user_menu_path="JS_PATH_HERE", logout_path="JS_PATH_HERE")
    
  3. 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(...)

  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

servicenow-selenium-0.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

servicenow_selenium-0.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file servicenow-selenium-0.2.tar.gz.

File metadata

  • Download URL: servicenow-selenium-0.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for servicenow-selenium-0.2.tar.gz
Algorithm Hash digest
SHA256 80a012a6031827ced6a6e93f935434fda02691aeeb12d50d54fc2364547d2a25
MD5 8709a627cb3f7f4be98274bea2f91b6c
BLAKE2b-256 4eeea0d43bc647f33c9ac0b1cd9729bc03eb7c9eee22e4911a1ed103e617042e

See more details on using hashes here.

File details

Details for the file servicenow_selenium-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for servicenow_selenium-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 29e43f20da26c31d322229697de9e8b3fe7212cb955d0628b89f728dc38cef61
MD5 d603783187d815b27b1a7cf2cf70a069
BLAKE2b-256 6a3d54e4525532109c33343e9831d505931283633a778bf9e2dd9159a3adfb78

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page