This packages crates a simple way to work with, Chrome and Firefox Browsers. More info in https://ibott.io/academy/
Project description
Browser activities
1. Chrome.py
Here you can find ChromeBrowser class. This class is used to create a browser object. It Heritages from the Chrome class and implements some custom methods to make browser automation easier.
Arguments:
- driver_path: path to the driver
- undetectable: if True, the browser will not be detected by antispam systems.
Attributes:
- driver_path: path to the driver
- undetectable: if True, the browser will not be detected by antispam systems.
- chrome_version: version of chrome
- options: options for the browser
Custom Methods:
- open(): open the browser and load defined options.
- ignore_images(): ignore images in the browser.
- ignore_popups(): ignore popups in the browser.
- ignore_notifications(): ignore notifications in the browser.
- ignore_errors(): ignore errors in the browser.
- headless(): open the browser in headless mode.
- save_cookies(): save the cookies of the browser.
- load_cookies(): load the cookies of the browser.
- set_proxy(proxy): set a proxy for the browser.
- set_user_agent(user_agent): set a user agent for the browser.
- set_profile(path): set a profile for the browser.
- scrolldown(h): scroll down to % height of the page .
- scrollup(h): scroll up to % height of the page .
- scroll_to_element(element): scroll to the element.
- set_download_folder(folder): set the download folder.
- element_exists(element): check if the element exists.
- add_tab(): add a new tab.
- get_tabs(): get the tabs of the browser.
- close_tab(): close the current tab.
- switch_to_tab(tab_number): switch to the tab.
- wait_for_element(element, timeout): wait for the element to appear.
- wait_for_element_to_disappear(element, timeout): wait for the element to disappear.
- wait_for_element_to_be_clickable(element, timeout): wait for the element to be clickable.
2. firefox.py
Here you can find FirefoxBrowser class. This class is used to create a browser object. It Heritages from the Firefox class and implements some custom methods to make browser automation easier.
Arguments:
driver_path: path to the driver undetectable: if True, to hide bot info in the browser.
Attributes:
- driver_path: path to the driver
- undetectable: if True, to hide bot info in the browser.
Methods:
- open(): This method opens firefox browser to start the navigation. Set Custom options before using this method.
- ignore_images(): This method ignores images in the browser.
- ignore_popups(): This method ignores popups in the browser.
- ignore_notifications(): This method ignores notifications in the browser.
- ignore_errors(): This method ignores errors in the browser.
- headless(): This method ignores
- save_cookies(): This method saves cookies in the browser.
- load_cookies(): This method loads cookies in the browser.
- set_proxy(): This method sets proxy in the browser.
- set_user_agent(): This method sets user agent in the browser.
- set_profile(): This method sets profile in the browser.
- set_download_folder(): This method sets download folder in the browser.
- scrolldown(): This method scrolls down the browser.
- scrollup(): This method scrolls up the browser.
- scroll_to_element(): This method scrolls to the element in the browser.
- element_exists(): This method checks if the element exists in the browser.
- add_tab(): This method adds a new tab in the browser.
- get_tabs(): This method gets all the tabs in the browser.
- switch_tab(): This method switches to the tab in the browser.
- wait_for_element(): This method waits for the element in the browser.
- wait_for_element_to_disappear(): This method waits for the element to disappear in the browser.
- wait_for_element_to_be_clickable(): This method waits for the element to be clickable in the browser.
3. web_elements.py
Custom WebElement class to add custom methods to WebElement class.
Methods:
- double_click() : Double click on the element.
- enter(): Enter text in the element.
- tab(): Tab on the element.
- escape(): Escape on the element.
- backspace(): Backspace on the element.
- write(text): Write text in the element.
- clear(): Clear the element.
- get_text(): Get text from the element.
- get_link(): Get link from the element.
- get_attribute(attribute): Get attribute from the element.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ibott_browser_manager-1.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46fb730ec22b6cb96ac95463e5ea571e38d3e0bf88bf3cdcbc4c818f523a98b5 |
|
MD5 | 8dda01e0e36f3c816fee3d8b836c1ae7 |
|
BLAKE2b-256 | 97b73a732227f8aedae960a4711f7d847e1c707c95715c54941977987ad06e1e |
Hashes for ibott_browser_manager-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b34433d41ef22d4a39b706e96b82557d15a69cef9f8b14caa3e24b03982aef80 |
|
MD5 | c27fada4d639ef2b4a2d49da6ae93b55 |
|
BLAKE2b-256 | 83140ef2500ad998db8f6fea2588f99ab9a4ca96ea0124a7dd6652c1a11e99a3 |