Skip to main content

A free, open-source web automation library for the Chrome browser using Selenium Python

Project description

SeleniumSimplified(Logo-SeleniumSimplified beta version)

Logo-SeleniumSimplified

A free, open-source web automation library to do anything and everything on the Chrome browser using Python.

USE SELENIUM SIMPLIFIED FOR

1. Browser Automation or Web Scrapping
2. API automation or Data Scrapping using API
3. Headless Browser automation

and many more uses cases

Description

This library is created keeping those developers in mind who wish to automate their website for a task but do not wish to spend an excessive amount of time learning a new library.We made every effort when creating this toolkit to make web automation as simple and efficient as possible. This library's backend is the Python client for Selenium. Selenium is the standard library for web automation and is quite powerful.

In order to make things simple and easy to understand for anyone with a background in selenium, we have made an effort to keep the function name as close to the original selenium functions as possible.

Advantages

This library has below advantages

  1. It is a plug-and-play library built on top of Selenium, you still get the power of Selenium when using it.
  2. It supports the Chrome browser out of the box; internally, everything is taken care of.
  3. It by default highlights the weblement (the target web element on which you wish to conduct some operations) before doing anything.
  4. It use XPATH as a default for the locator strategy.
  5. Saves a tonne of time by preventing us from writing repetitive code because it is simple to setup and use.

How to install

pip install selenium-simplified

Example

Below code will open chrome browser and navigate to Google home page and do a search for SeleniumSimplified

from simplified import *

driver = SeleniumSimplified()
driver.open_url(url='https://www.google.com')
driver.type_in_element(xpath="//*[@name='q']",text='selenium')
driver.click_on_element(xpath="//*[@name='btnK']")

Functions Supported

  1. open_url - Used for open a url in the chrome browser, takes one param1- as url
  2. type_in_element - Used for typing in input box, takes to parameter param1- xpath as locator and param2- as text
  3. click_on_element - Used for clicking on web-element, takes one param1- as xpath
  4. take_screenshot - Use when you have to take screenshot, take one param1 as dir (directory name)
  5. get_tab_title - Use to get the current tab title in the browser, do not take any params
  6. close_current_tab - Use to close the current tab in focus in the browser,do not take any params
  7. close_browser - Use for closing the current browser instance including all tabs, do not take any params

adding more functions...

Example Usage - Basic user actions

# Step 1 : install the library
# pip install selenium-simplified

# Step 2: import the library
from simplified import SeleniumSimplified

# Step 3 - Open the chrome browser
driver = SeleniumSimplified()

'''
Examples - Showing how to use SeleniumSimplified functions
Please Note - SeleniumSimplified uses XPATH only as its locator strategy
'''

# How to open a specific url
driver.open_url(url='https://www.google.com')

# How to find an element and type some text in it
driver.type_in_element(xpath="//*[@name='q']",text='selenium')

# How to find an element and click on it
driver.click_on_element(xpath="//*[@name='btnK']")

# How to take screenshot and save it inside the screenshot directory
driver.take_screenshot(dir='../screenshot/')

# how to get the current browser tab title
print(driver.get_tab_title())

# How to close the current browser tab
driver.close_current_tab()

# How to close browser
driver.close_browser()

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

selenium-simplified-0.18.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

selenium_simplified-0.18-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file selenium-simplified-0.18.tar.gz.

File metadata

  • Download URL: selenium-simplified-0.18.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.2

File hashes

Hashes for selenium-simplified-0.18.tar.gz
Algorithm Hash digest
SHA256 bf8d7db5cc771df2667773bf7f99dea7a889e84789327f9c0768cae72d520936
MD5 2c8f6b58b9fc54f84e9d01eaa311b6de
BLAKE2b-256 da56ac9727ebd0f78479042d59fe160b04706c81ab0daf8c2c0d8ea6ffb5c710

See more details on using hashes here.

File details

Details for the file selenium_simplified-0.18-py3-none-any.whl.

File metadata

File hashes

Hashes for selenium_simplified-0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 296b43b3375f1b1938c0f016361ebe023752bc521f4898988390e75b882867b1
MD5 2a7e5cb28014de5b741961938617902b
BLAKE2b-256 486cae1894ff10c857df32ca6a118596e581d1250ead2ddb195c573589dd38f9

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