{"id":25198041,"url":"https://github.com/danedens/dansseleniumpageutilities","last_synced_at":"2025-04-04T17:17:26.543Z","repository":{"id":190641197,"uuid":"683063921","full_name":"DanEdens/DansSeleniumPageUtilities","owner":"DanEdens","description":"My Selenium Page utilities file","archived":false,"fork":false,"pushed_at":"2023-09-29T22:05:36.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T02:41:23.262Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DanEdens.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-25T14:06:46.000Z","updated_at":"2023-08-25T14:06:52.000Z","dependencies_parsed_at":"2023-08-25T18:52:14.199Z","dependency_job_id":"ff8e4a10-9462-4709-8405-18a8725a0901","html_url":"https://github.com/DanEdens/DansSeleniumPageUtilities","commit_stats":null,"previous_names":["danedens/dansseleniumpageutilities"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanEdens%2FDansSeleniumPageUtilities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanEdens%2FDansSeleniumPageUtilities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanEdens%2FDansSeleniumPageUtilities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanEdens%2FDansSeleniumPageUtilities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DanEdens","download_url":"https://codeload.github.com/DanEdens/DansSeleniumPageUtilities/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217220,"owners_count":20903009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-10T02:40:37.725Z","updated_at":"2025-04-04T17:17:26.510Z","avatar_url":"https://github.com/DanEdens.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"PageUtilities Class for Web Automation\nThe PageUtilities class is designed to provide various utility functions for web automation tasks. This class is specifically tailored for interaction with web pages using the Selenium library. It offers methods to handle interactions with web elements, perform actions like clicking, sending keystrokes, and more.\n\nGetting Started\nTo use the PageUtilities class, you need to have the Selenium library installed. You can install it using the following command:\n\n  pip install selenium\n\nMake sure you have a compatible web driver for your browser installed as well. There is a script to check driver installs included.\n\n### Usage\nYou can use the PageUtilities class by creating an instance and passing the web driver instance to its constructor. Here's an example of how to use the class to interact with web elements:\n\n### python\n\nfrom selenium import webdriver\nfrom page_utilities import PageUtilities  # Import the PageUtilities class\n\n# Create a web driver instance\ndriver = webdriver.Chrome()  # Use the appropriate driver for your browser\n\n# Initialize PageUtilities with the web driver\npage_utils = PageUtilities(driver)\n\n# Example usage: Clicking an element\nelement_to_click = driver.find_element_by_id(\"element_id\")\npage_utils.click_element(element_to_click)\n\n# Example usage: Sending keys to an element\ninput_element = driver.find_element_by_name(\"input_name\")\npage_utils.set_attribute_value(input_element, \"Hello, PageUtilities!\")\n\n# Features\n## Clicking Elements\nThe click_element method allows you to click on a specified element. It supports both regular clicking and clicking based on element coordinates.\n\n## Sending Keystrokes\nThe send_keystrokes_to_element method enables you to send keystrokes to a specific element. This is useful for interacting with input fields or triggering certain actions on the page.\n\n## Getting and Setting Attribute Values\nThe get_attribute_value and set_attribute_value methods provide functionality to get and set attribute values of web elements.\n\n## Checking Element Display\nThe element_is_displayed method allows you to check if a specific element is displayed on the page within a specified timeout.\n\n## Handling Alerts\nThe handle_alert_window method can be used to switch to an alert window, retrieve its text, and accept the alert.\n\n## Checking Current Page\nThe check_home method helps you determine if the current page is the \"home\" page by examining the URL.\n\n## Scrolling the Page\nThe scroll_page_bottom method lets you scroll the page to the bottom.\n\n## Customization\nThe PageUtilities class provides options for customization, such as enabling click based on element coordinates and taking screenshots before clicks. These settings can be configured using the provided properties.\n\nFor more details on each method's parameters and usage, refer to the docstrings within the class implementation.\n\nCompatibility\nThe provided code has been designed to work with Selenium and is compatible with various web drivers and browsers. Make sure to use the appropriate web driver for your chosen browser.\n\nContributions\nContributions and improvements to the PageUtilities class are welcome. If you find any issues or have suggestions, feel free to open an issue or submit a pull request on GitHub.\n\nHappy web automation!\n\nPlease note that the above README is a general guide to using the PageUtilities class. You might need to adjust and expand the content based on your project's specific requirements and the audience you intend to share it with.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanedens%2Fdansseleniumpageutilities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanedens%2Fdansseleniumpageutilities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanedens%2Fdansseleniumpageutilities/lists"}