Skip to main content

A helpful library for finding and interacting with PeopleSoft components using Selenium

Project description

PeopleSoft Components Library

A Python library designed to simplify finding and interacting with PeopleSoft components using Selenium WebDriver. This library provides abstractions for commonly used UI elements in PeopleSoft applications, such as buttons, tiles, and input fields.

Features

  • Modular Components: Includes Button, Image, TextInput, PasswordInput, and Tile components, each designed to make interaction with PeopleSoft UI elements straightforward.
  • Robust Base Classes: Provides BaseComponent and BaseInput classes for building custom components.
  • Selenium Integration: Fully compatible with Selenium WebDriver.

Installation

Install the package directly from the GitLab Package Registry:

pip install --index-url https://gitlab.com/api/v4/projects/64588891/packages/pypi peoplesoft-components

Usage

General Usage

Import the components and use them to interact with PeopleSoft UI elements in your Selenium scripts:

from selenium import webdriver
from peoplesoft_components import Button, TextInput, Tile


driver = webdriver.Chrome()
driver.get("https://your-peoplesoft-url.com")

# Interact with a button
button = Button.get_by_label(driver, "Submit")
button.click()

# Fill a text input field
text_input = TextInput.get_by_label(driver, "Username")
text_input.send_keys("my_username")

# Interact with a tile
tile = Tile.get_by_label(driver, "Student Center")
tile.click()

Components

This library provides several pre-defined components for interacting with PeopleSoft UI elements.
Below are details for each component, including how to find and interact with them.
N.B. All components extend a normal Selenium WebElement, meaning you have access to all the native Selenium methods and interactions.

Button

Represents a button element (<input> with the class ps-button).

  • Methods:
    • Button.get_by_label(driver, label): Finds a button by its label (the value attribute of the <input>).

Example:

from peoplesoft_components import Button


button = Button.get_by_label(driver, "Submit") 
button.click()

TextInput

Represents a text input element (<input> with type text).

  • Methods:
    • TextInput.get_by_label(driver, label): Finds a text input field by its associated <label> text.

Example:

from peoplesoft_components import TextInput


text_input = TextInput.get_by_label(driver, "Username")
text_input.send_keys("my_username")

PasswordInput

Represents a password input element (<input> with type password).

  • Methods:
    • PasswordInput.get_by_label(driver, label): Finds a password input field by its associated <label> text.

Example:

from peoplesoft_components import PasswordInput


password_input = PasswordInput.get_by_label(driver, "Password")
password_input.send_keys("my_password")

Tile

Represents a tile element, typically found in dashboards or navigation areas.

  • Methods:
    • Tile.get_by_label(driver, label): Finds a tile by its visible label text.

Example:

from peoplesoft_components import Tile


tile = Tile.get_by_label(driver, "Student Center")
tile.click()

Image

Represents an image element (<img>).

  • Methods:
    • Image.get_by_alt_text(driver, alt_text): Finds an image by its alt attribute.

Example:

from peoplesoft_components import Image


image = Image.get_by_alt_text(driver, "Logo") 
src = image.get_attribute("src") 

Getting Started with Development

To set up the project for development:

1. Clone the Repository

git clone https://gitlab.com/campus-solutions-automated-testing-group/peoplesoft-selenium-components.git  
cd peoplesoft-selenium-components

2. Install Dependencies

Use a virtual environment and install the required dependencies:

python -m venv venv  
source venv/bin/activate  # On Windows: venv\Scripts\activate  
pip install -r requirements.txt

3. Build the Package

Build the package locally to test distribution:

python -m build

Resources


Contributing

Contributions are welcome! Please fork the repository, create a feature branch, and submit a merge request. Ensure all new code is covered by tests.


License

This project is licensed under the terms specified in the LICENSE file.

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

peoplesoft_selenium_components-0.1.1.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

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

peoplesoft_selenium_components-0.1.1-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file peoplesoft_selenium_components-0.1.1.tar.gz.

File metadata

File hashes

Hashes for peoplesoft_selenium_components-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b9682414a614c81d37b77d2ed0073b87489ca7ba706d5905f7e060c03cdd995d
MD5 655ce32b3c3e1d369d60ec1140a22a71
BLAKE2b-256 9bce746b7d19cef4c8ec8e542749eabef8a3c3d472a836415812fe160ad37163

See more details on using hashes here.

File details

Details for the file peoplesoft_selenium_components-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for peoplesoft_selenium_components-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e82589ec0ad1644514f8e657444f15f8223467b6d4b70316277598b3219fb073
MD5 94a476b18bf86bcf5836105729d1cf49
BLAKE2b-256 cac0558a04ec8f1809f03e6a57d0eed8b4927c7d0a29298a9d64fc9dcf15a2cd

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