selenium-pro


Nameselenium-pro JSON
Version 1.4.4 PyPI version JSON
download
home_page
SummaryAutomation Library
upload_time2022-12-14 06:12:29
maintainer
docs_urlNone
authorDataKund
requires_python
licenseApache License 2.0
keywords selenium no-html web-scraping bots test-automation no-code low-code cloud proxy datakund
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![This is an image](https://firebasestorage.googleapis.com/v0/b/datakund-studio.appspot.com/o/selenium%20pro1.png?alt=media&token=45a2f1cd-b577-4bb5-9ff8-8e91ac7c9aec)

# selenium pro - intelligent & powerful cloud native selenium
[![PyPI version](https://badge.fury.io/py/selenium-pro.svg)](https://badge.fury.io/py/selenium-pro)

### Benefits of selenium-pro over selenium
- All the capabilities of Selenium + 
- Auto write scripts using Selenium Script Generator
- No Inspection of HTML Elements required
- Intelligent Element Handling Automatically in case of HTML changes
- Auto Setup Chromedrivers based on Operating System & Browser versions
- Run scripts in Cloud with single function call
- Bypass Automated Browser Detection
- Coming Up - Convert your old selenium scripts to selenium pro so that they never fail due to element errors

### [Selenium Pro Auto Code Generator Chrome Extension](https://chrome.google.com/webstore/detail/selenium-auto-code-genera/ocimgcpcnobcnmclomhhmjidgoiekeaf)
- Install the extension in your browser
- Start Recording your actions like 
  - Open Url
  - Click
  - Type
  - Scrape (right click on element & use scrape option)
  - etc.
- Selenium-Pro code will be generated automatically
- Copy it & run in your python shell

### Installation
```sh
pip install selenium-pro
```

### Import
If you already using selenium, just replace `selenium` with `selenium_pro` everywhere in your imports  
If not, just use below lines to import
```sh
from selenium_pro.webdriver.common.keys import Keys
from selenium_pro import webdriver
```

### Start Browser
This method starts automated window on your default browser. It installs all the drivers required
```sh
driver = webdriver.Start()
```

### Example
Below script searches given keyword on google & scrapes result count
```sh
from selenium_pro.webdriver.common.keys import Keys
from selenium_pro import webdriver

driver = webdriver.Start()

# Open URL
driver.get('https://www.google.com/')

# Advanced method to click on search bar
driver.find_element_by_pro('QYQyyPtidm5_xqG').click_pro()

# Type in search bar
driver.switch_to.active_element.type('shoes\n')

# Advanced method to scrape result count
result_count=driver.find_element_by_pro('z6XMV66vxokYpfn').text
print('result_count ',result_count)

driver.quit()

```

### find_element_by_pro() method
- This is one of the advanced methods added in this library aside from the conventional methods in selenium.
- This method finds element without you having to mention selectors or locators
- Also this ensures that whenever HTML element changes, its able to adapt to changes & work fine without you having to do any code change
- Use this [Selenium Pro Auto Code Generator Chrome Extension](https://chrome.google.com/webstore/detail/selenium-auto-code-genera/ocimgcpcnobcnmclomhhmjidgoiekeaf) to get pro-id for any element on the web

### Find multiple similar elements
Just replace **find_element** with **find_elements**

### find_elements_by_pro() method 
It finds all elements similar to the element which you pointed in the extension  
eg. Below script opens pypi search result link & fetches the titles of resulting packages

```sh
from selenium_pro.webdriver.common.keys import Keys
from selenium_pro import webdriver

driver = webdriver.Start()

# Open URL
driver.get("https://pypi.org/search/?q=firebase")

# Advanced Method to find all search results titles on the page
search_results_titles=driver.find_elements_by_pro("ErZwU_jOEg0s4_9")

# Loop over the list & print each text
for result_title in search_results_titles:
	print(result_title.text)

driver.quit()

```

### Start() method
- This method will check your operating system, default browser & its version & install driver accordingly
- You can still use conventional methods if you want  specific configuration


### All Default Selenium Functions Work Well
```sh
#find elements by conventional methods
driver.find_elements(By.XPATH, '//button')

#close window
driver.close()

#set cookies in browser
driver.add_cookie({})

....
```

#### All your existing selenium scripts will work fine with selenium pro. Just import selenium pro instead

```sh
#from selenium import webdriver
from selenium_pro import webdriver
#from selenium.webdriver.support.ui import WebDriverWait
from selenium_pro.webdriver.support.ui import WebDriverWait

## Old Selenium Code.....
```

### Intermix Advanced & Conventional Methods
You can use both conventional & advanced methods in your scripts
eg. Below code searches keyword on pypi & scrapes few details of package

```sh
from selenium_pro.webdriver.common.keys import Keys
from selenium_pro import webdriver

driver = webdriver.Start()

driver.get("https://pypi.org")

# Conventional method to click on search bar
driver.find_element_by_id('search').click()

driver.switch_to.active_element.type('datakund\n')

# Advanced method to click on 1st item in search results
driver.find_element_by_pro('NEHC72vwdxktcm5').click_pro()

# Conventional method to scrape title
title=driver.find_element_by_class_name('package-header__name').text
print('title ',title)

# Advanced method to scrape release_date
release_date=driver.find_element_by_pro('STT9vQuCT0fdEdq').text
print('release_date ',release_date)

# Advanced method to scrape author
author=driver.find_element_by_pro('gsANAnAvkCt7_aM').text
print('author ',author)

# Conventional method to scrape description
description=driver.find_element_by_class_name('package-description__summary').text
print('description ',description)

driver.quit()
```

### [Selenium Pro Auto Code Generator Chrome Extension](https://chrome.google.com/webstore/detail/selenium-auto-code-genera/ocimgcpcnobcnmclomhhmjidgoiekeaf)

### [Complete Selenium Documentation Available here](https://www.selenium.dev/documentation/)
### [Selenium Python Docs](https://selenium-python.readthedocs.io/)

### Contact Us
* [Telegram](https://t.me/datakund)
            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "selenium-pro",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "selenium no-html web-scraping bots test-automation no-code low-code cloud proxy datakund",
    "author": "DataKund",
    "author_email": "datakund@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/4c/c7/94e13ef525545ac87338a9c2dbbadf16e56aa73cfb92bc4c0829a246341d/selenium_pro-1.4.4.tar.gz",
    "platform": null,
    "description": "![This is an image](https://firebasestorage.googleapis.com/v0/b/datakund-studio.appspot.com/o/selenium%20pro1.png?alt=media&token=45a2f1cd-b577-4bb5-9ff8-8e91ac7c9aec)\n\n# selenium pro - intelligent & powerful cloud native selenium\n[![PyPI version](https://badge.fury.io/py/selenium-pro.svg)](https://badge.fury.io/py/selenium-pro)\n\n### Benefits of selenium-pro over selenium\n- All the capabilities of Selenium + \n- Auto write scripts using Selenium Script Generator\n- No Inspection of HTML Elements required\n- Intelligent Element Handling Automatically in case of HTML changes\n- Auto Setup Chromedrivers based on Operating System & Browser versions\n- Run scripts in Cloud with single function call\n- Bypass Automated Browser Detection\n- Coming Up - Convert your old selenium scripts to selenium pro so that they never fail due to element errors\n\n### [Selenium Pro Auto Code Generator Chrome Extension](https://chrome.google.com/webstore/detail/selenium-auto-code-genera/ocimgcpcnobcnmclomhhmjidgoiekeaf)\n- Install the extension in your browser\n- Start Recording your actions like \n  - Open Url\n  - Click\n  - Type\n  - Scrape (right click on element & use scrape option)\n  - etc.\n- Selenium-Pro code will be generated automatically\n- Copy it & run in your python shell\n\n### Installation\n```sh\npip install selenium-pro\n```\n\n### Import\nIf you already using selenium, just replace `selenium` with `selenium_pro` everywhere in your imports  \nIf not, just use below lines to import\n```sh\nfrom selenium_pro.webdriver.common.keys import Keys\nfrom selenium_pro import webdriver\n```\n\n### Start Browser\nThis method starts automated window on your default browser. It installs all the drivers required\n```sh\ndriver = webdriver.Start()\n```\n\n### Example\nBelow script searches given keyword on google & scrapes result count\n```sh\nfrom selenium_pro.webdriver.common.keys import Keys\nfrom selenium_pro import webdriver\n\ndriver = webdriver.Start()\n\n# Open URL\ndriver.get('https://www.google.com/')\n\n# Advanced method to click on search bar\ndriver.find_element_by_pro('QYQyyPtidm5_xqG').click_pro()\n\n# Type in search bar\ndriver.switch_to.active_element.type('shoes\\n')\n\n# Advanced method to scrape result count\nresult_count=driver.find_element_by_pro('z6XMV66vxokYpfn').text\nprint('result_count ',result_count)\n\ndriver.quit()\n\n```\n\n### find_element_by_pro() method\n- This is one of the advanced methods added in this library aside from the conventional methods in selenium.\n- This method finds element without you having to mention selectors or locators\n- Also this ensures that whenever HTML element changes, its able to adapt to changes & work fine without you having to do any code change\n- Use this [Selenium Pro Auto Code Generator Chrome Extension](https://chrome.google.com/webstore/detail/selenium-auto-code-genera/ocimgcpcnobcnmclomhhmjidgoiekeaf) to get pro-id for any element on the web\n\n### Find multiple similar elements\nJust replace **find_element** with **find_elements**\n\n### find_elements_by_pro() method \nIt finds all elements similar to the element which you pointed in the extension  \neg. Below script opens pypi search result link & fetches the titles of resulting packages\n\n```sh\nfrom selenium_pro.webdriver.common.keys import Keys\nfrom selenium_pro import webdriver\n\ndriver = webdriver.Start()\n\n# Open URL\ndriver.get(\"https://pypi.org/search/?q=firebase\")\n\n# Advanced Method to find all search results titles on the page\nsearch_results_titles=driver.find_elements_by_pro(\"ErZwU_jOEg0s4_9\")\n\n# Loop over the list & print each text\nfor result_title in search_results_titles:\n\tprint(result_title.text)\n\ndriver.quit()\n\n```\n\n### Start() method\n- This method will check your operating system, default browser & its version & install driver accordingly\n- You can still use conventional methods if you want  specific configuration\n\n\n### All Default Selenium Functions Work Well\n```sh\n#find elements by conventional methods\ndriver.find_elements(By.XPATH, '//button')\n\n#close window\ndriver.close()\n\n#set cookies in browser\ndriver.add_cookie({})\n\n....\n```\n\n#### All your existing selenium scripts will work fine with selenium pro. Just import selenium pro instead\n\n```sh\n#from selenium import webdriver\nfrom selenium_pro import webdriver\n#from selenium.webdriver.support.ui import WebDriverWait\nfrom selenium_pro.webdriver.support.ui import WebDriverWait\n\n## Old Selenium Code.....\n```\n\n### Intermix Advanced & Conventional Methods\nYou can use both conventional & advanced methods in your scripts\neg. Below code searches keyword on pypi & scrapes few details of package\n\n```sh\nfrom selenium_pro.webdriver.common.keys import Keys\nfrom selenium_pro import webdriver\n\ndriver = webdriver.Start()\n\ndriver.get(\"https://pypi.org\")\n\n# Conventional method to click on search bar\ndriver.find_element_by_id('search').click()\n\ndriver.switch_to.active_element.type('datakund\\n')\n\n# Advanced method to click on 1st item in search results\ndriver.find_element_by_pro('NEHC72vwdxktcm5').click_pro()\n\n# Conventional method to scrape title\ntitle=driver.find_element_by_class_name('package-header__name').text\nprint('title ',title)\n\n# Advanced method to scrape release_date\nrelease_date=driver.find_element_by_pro('STT9vQuCT0fdEdq').text\nprint('release_date ',release_date)\n\n# Advanced method to scrape author\nauthor=driver.find_element_by_pro('gsANAnAvkCt7_aM').text\nprint('author ',author)\n\n# Conventional method to scrape description\ndescription=driver.find_element_by_class_name('package-description__summary').text\nprint('description ',description)\n\ndriver.quit()\n```\n\n### [Selenium Pro Auto Code Generator Chrome Extension](https://chrome.google.com/webstore/detail/selenium-auto-code-genera/ocimgcpcnobcnmclomhhmjidgoiekeaf)\n\n### [Complete Selenium Documentation Available here](https://www.selenium.dev/documentation/)\n### [Selenium Python Docs](https://selenium-python.readthedocs.io/)\n\n### Contact Us\n* [Telegram](https://t.me/datakund)",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "Automation Library",
    "version": "1.4.4",
    "split_keywords": [
        "selenium",
        "no-html",
        "web-scraping",
        "bots",
        "test-automation",
        "no-code",
        "low-code",
        "cloud",
        "proxy",
        "datakund"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "1bc6056813cdb5eb462cf6e5fb5b6bde",
                "sha256": "871766b2fc0dcc02cd1f1309a9ef81ad984a9baf80f835e14f139867d8fdd9de"
            },
            "downloads": -1,
            "filename": "selenium_pro-1.4.4.tar.gz",
            "has_sig": false,
            "md5_digest": "1bc6056813cdb5eb462cf6e5fb5b6bde",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 836977,
            "upload_time": "2022-12-14T06:12:29",
            "upload_time_iso_8601": "2022-12-14T06:12:29.473563Z",
            "url": "https://files.pythonhosted.org/packages/4c/c7/94e13ef525545ac87338a9c2dbbadf16e56aa73cfb92bc4c0829a246341d/selenium_pro-1.4.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-14 06:12:29",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "selenium-pro"
}
        
Elapsed time: 0.19638s