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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

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