Saravanan666/pypi-org huggingface dataset:
Package: selenible
selenibledo selenium like ansible# open google and take screenshot-name:open urlopen:https://www.google.com-name:screenshotscreenshot:output.pngrequirementspython3selenium webdriverphantomjschromefirefoxetc...installpip install selenibleusage# selenible
Usage: selenible [OPTIONS] COMMAND [ARGS]...

Options:
  --version       Show the version and exit.
  --verbose
  --quiet
  --logfile PATH
  --help          Show this message and exit.

Commands:
  browser-options  show browser options
  dump-schema      dump json schema
  list-modules     list modules
  run              run playbook
  validate         validate by json schema# selenible list-modules
+------------------+-----------------------------------------------------------+
|      Module      |                        Description                        |
+==================+===========================================================+
| alertOK          | - name: accept alert                                      |
|                  |   alertOK: true                                           |
|                  | - name: cancel alert                                      |
|                  |   alertOK: false                                          |
+------------------+-----------------------------------------------------------+
| auth             | - name: basic/digest auth                                 |
|                  |   auth:                                                   |
   :# selenible run --help
Usage: selenible run [OPTIONS] [INPUT]

  run playbook

Options:
  --driver [phantom|chrome|firefox|safari|edge|webkit|dummy|ie|opera|android|remote]
  -x, --extension TEXT
  --step
  --screenshot
  -e TEXT
  --var FILENAME
  --help                          Show this message and exit.developmentgit clonehttps://github.com/wtnb75/selenible.gitcd seleniblepip install -r requirements.txt# python -m selenible.cli
Usage: cli.py [OPTIONS] COMMAND [ARGS]...

  :

# python -m selenible.cli list-modules
+--------------+---------------------------------------------------------------+
|    Module    |                          Description                          |
+==============+===============================================================+
| alertOK      | - name: accept alert                                          |
|              |   alertOK: true                                               |
|              | - name: cancel alert                                          |
   :install HEADpip install -e 'git+https://github.com/wtnb75/selenible.git#egg=selenible'selenible --help...(uninstall)pip uninstall selenible -yexamples# input text into translate service and get new text-name:get textset:input_multiline:"input(ctrl-d):"register:srcwhen_not:defined:src-name:open google translateopen:https://translate.google.com/-name:set inputsetTextValue:text:"{{src}}"id:source-name:sleepsleep:3-name:get outputsave:mode:textid:result_boxregister:dst-name:resultecho:"{{dst}}"andmore examples...work with jupyter notebookinstall kerneljupyter kernelspec install --user seleniblepiterexampleshelloworldLinkspypicoveragelocal pypi repo
Package: selenious
SeleniousEnhances Selenium with timeouts and recover capabilities.Free software: BSD licenseDocumentation:https://selenious.readthedocs.io.IntroductionSelenious enhances Selenium WebDriverfind_element*functions to have atimeout,poll_frequency, andrecover.  Thefind_elements*functions are additionally enhanced withdebounceandminsettings.Selenium already has animplicitly_waitand aWebDriverWaitfunction.
Neither of these have the versatility and natural feel that Selenious gives
the code.  To add a 5 second timeout to a single call, Selenious would
be::driver.find_element_by_id('popup', timeout=5)While withimplicitly_waitthe code would be::driver.implicitly_wait(5)
driver.find_element_by_id('popup')
driver.implicitly_wait(hopefully_you_know_what_the_setting_was_before)AndWebDriverWaitwould be::WebDriverWait(driver, 5).until(
    EC.presence_of_element_located((By.ID, "popup"))
)FeaturesEnhancement to the find_element functiontimeout- The maximum time in seconds to wait for a succesful find.poll_frequency- How often to poll the driver for the elementdebounce- Forfind_elements*wait for this time period for the count to not change.min- Forfind_elements*the minimum count to find.recover- If the item or min items are not found, call this periodically and try again.Drop-in replacement for selenium webdriverInstead offrom selenium.webdriver import Chromea convenience
offrom selenious.webdriver import Chromecan be used that
imports theSeleniousMixinfor you.Settings can be set in the function or globallyLocally,webdriver.find_element_by_id('id', timeout=5), or globaly,webdriver.timeout = 5.Support of recover() for click()If a click() command raises an exception, if set, therecover()function
will be called once and the click attempted again.  This allows for recovering
from such events as a modal popup being shown or the button has scrolled out
of view.No deprecation of the find_element[s]by* methodsThe developers of selenium have made the decision to deprecate redundant
functions such asfind_element_by_id(id_)with the common function
and aByparameter.find_element(By.ID, id_).  Selenious will continue
to support these convenience functions and not print a warning.CreditsThis package was created with Cookiecutter_ and theaudreyr/cookiecutter-pypackage_ project template.Cookiecutteraudreyr/cookiecutter-pypackageHistory0.2.1 (2021-11-30)Documentation enhancements0.2.0 (2021-11-28)Add element.find_element[s]*() function support.Add element.click() recover support.0.1.0 (2020-10-11)First release on PyPI.
Package: selenium-2captcha-solver
Selenium 2CAPTCHA solverUsagefromselenium_2captcha_solverimportsolve_recaptchav2fromtwocaptchaimportTwoCaptchafromseleniumimportwebdriverfromselenium.webdriver.common.byimportBy# Create TwoCaptcha instancetwo_captcha=TwoCaptcha(apiKey="2CAPTCHA_API_KEY")# Create selenium driver instance and open page with captch you need to solvedriver=webdriver.Chrome()driver.get("https://www.google.com/recaptcha/api2/demo")# Find recaptcha elementrecaptcha_element=driver.find_element(By.CLASS_NAME,'g-recaptcha')# Call the solve_recaptchav2solve_recaptchav2(two_captcha,driver,recaptcha_element)# And submit your form or anything elsedriver.find_element(By.ID,"recaptcha-demo-submit").click()
Package: seleniumabsxy
Clicks on Selenium webelements at a certain screen position (x,y)pip install seleniumabsxyTested against Windows 10 / Python 3.10 / AnacondaThis module can benefit individuals or developers who need to automate browser interactions,
such as clicking on specific elements or locations within a web page. By providing the ability to click on coordinates,
it allows for precise interactions with web elements that may not be easily accessible through other means.Advantages of this module include:Automation:It enables automated clicking on specific coordinates within a browser window, which can save time and effort when performing repetitive tasks.Precise Interactions:By specifying exact coordinates, it allows for precise targeting of specific elements or locations on a web page.
Integration with Chrome: The module integrates with undetected_chromedriver,
which provides an undetectable Chrome browser instance, allowing for seamless automation without detection by websites.Hotkey Support:The module offers the ability to set a hotkey combination to print the current cursor coordinates, which can be useful for debugging or identifying target locations.# This code imports necessary libraries and functions, sets a hotkey combination to show# the cursor coordinates, creates a Chrome browser instance with specific options, assigns the# driver to the coordsclicker module, waits for 5 seconds, opens a webpage (https://python.org),# maximizes the browser window, and provides instructions on how to use the click_on_coords function# to click on an object by specifying its coordinates.# The Browser must either be maximized or the x-coordinate has to be 0 if not maximizedfromtimeimportsleepimportundetected_chromedriverasucfromseleniumabsxyimportset_show_hotkey_coords,click_on_coords,coordsclickerif__name__=="__main__":set_show_hotkey_coords(hotkey='ctrl+alt+k')chrome_opt=uc.ChromeOptions()chrome_opt.add_argument("--incognito")driver=uc.Chrome(options=chrome_opt,)# works also with Selenium, but Chrome onlycoordsclicker.driver=driver# important!!sleep(5)driver.get(r"https://python.org")driver.fullscreen_window()# Go to the object you want to click on, press 'ctrl+alt+k', and call click_on_coords(x,y)# The click_on_coords function retrieves a clickable element at the specified coordinates and clicks on it.# After pressing 'ctrl+alt+k', you will see something like this# x=1277, y=459# This is how you click# click_on_coords(x=1277, y=459)
Package: selenium-ai
selenium-aiAI utility functions for webscraping and selenium automation scriptsInstallationpip install selenium-aiRequirementsWritten for Python 3.3+Requires selenium, bs4Requires installation of geckodriver compatible with selenium. Read about setuphereback to topFeaturesThe following features are available:find_elements_by_attribute_pattern: returns elements with attributes that match a regex pattern.Find Elements by Attribute Patternfrom selenium_ai import ElementFinder

from selenium import webdriver
driver = webdriver.Firefox()
element_finder = ElementFinder(driver)

driver.get("https://bing.com")
elements = element_finder.find_elements_by_attribute_pattern("enter your search term")Returns list of selenium elementsback to topCreditsThis package was created with Cookiecutter and thecs01/cookiecutter-pypackageproject template.Cookiecuttercs01/cookiecutter-pypackage
Package: selenium-assist
selenium-assistPython package for easy writing of Selenium scripts.Implemented helper functions:connect_webdriverload_pagewait_for_presencewait_for_visibilityclick_elementsend_keyshoover_over_elementswitch_to_iframeget_table_dataget_element_textexecute_scriptinstallpipinstallselenium-assistusageimporttimeimportselenium_assistassafromselenium.webdriver.common.keysimportKeysimportlogging# setup and silence loggerslogging.basicConfig(level=logging.DEBUG)logging.getLogger("selenium.webdriver.remote.remote_connection").setLevel(logging.WARNING)logging.getLogger("urllib3").setLevel(logging.WARNING)# connect webdriver (use False for headless mode)driver=sa.connect_webdriver(True)# do stuffsa.load_page("Loading initial webpage ...","https://google.com/ncr",driver)sa.wait_for_presence("Waiting for Accept all ...",'//*[@id="L2AGLb"]',driver,extra_timeout=1)sa.click_element("Clicking Accept all ...",'//*[@id="L2AGLb"]',driver)sa.wait_for_presence("Waiting for Google Search ...",'//*[@id="APjFqb"]',driver)sa.click_element("Clicking search box ...",'//*[@id="APjFqb"]',driver)sa.send_keys("Sending text ...",'//*[@id="APjFqb"]',"news"+Keys.ENTER,driver,skip_check=True)# close webdriverlogging.debug("Done with webdriver, sleeping 3s and exiting ...")time.sleep(3)driver.close()
Package: selenium-async
selenium-asyncMake Selenium easy to by managing a browser pool, andasynciocompatibility!Source:https://github.com/munro/python-selenium-asyncDocumentation:https://selenium-async.readthedocs.io/en/latest/installpoetryaddselenium-asyncusageimportselenium_asyncdefget_title(driver:selenium_async.WebDriver):driver.get("https://www.python.org/")returndriver.titleprint(awaitselenium_async.run_sync(get_title))# prints: Welcome to Python.orglicenseMIT
Package: selenium-aurelia
Wrapper around selenium drivers to ease testing ofAureliabased applications.Inspired bythe aurelia plugin for protractor.APITheAureliaDriverclass takes one positionnal parameter: a selenium webdriver. The full list of drivers is availablehere.Options of AureliaDriverTheAureliaDriverclass takes the following keyword arguments:script_timeout(default:: 10): the timeout forexecute_async_script. This is used internally to wait for the application to be loaded or to complete navigation.default_wait_time(default:2): the time to wait by default in seconds. This is used byAureliaDriver.waitif no time is supplied and to wait for the inAureliaDriver.load_urlto wait for Aurelia to complete the initialization of the page.wait_on_navigationwait fordefault_wait_timeafter each navigation before continuing the script.started_condition(default:None): it is possible that your app will be loaded before the AureliaDriver has the time to register the proper callback in the browser. In this case,load_urlwill fail because of a time out. To prevent this, you can specify a custom condition you know is fulfilled when Aurelia is started on your application. For instance, if your application has a spinner with the splash class, you can use:document.querySelector("[aurelia-app]").children[0].getAttribute('class')=== 'splash'.load_urlLoad the given url and wait for Aurelia to be full initiazed.parameters:url: the url to open.waitSleep for the specified amount of time. If no argument is provided or if seconds is lower or equal than 0,AureliaDriver.default_wait_timewill be used.keyword arguments:seconds(default:0): number of seconds for which to sleep.navigateContext manager in which you can to your navigation operation to ensure the app navigated to the new URL and was updated before continuing your tests. Use like this:withdriver.navigate():link.click()assertno_new_pagekeyword arguments:wait(default:0): time to wait after navigation before continuing. There are several cases to consider:Ifwaitis greater than 0, the driver will wait for the specified time.Ifself.wait_on_navigationisTrueandwaitis lower or equal than 0, the driver will wait forself.default_wait_time.Ifself.wait_on_navigationisFalseand wait is lower or equal than 0, the driver will not wait.find_element_by_bindingReturn the first element matching the specified binding.parameters:attr: the name of the attribute used in the binding. For instance, insrc.bind="heroSrc"it issrc.value: the value for which to look for. For instance, insrc.bind="heroSrc", it isheroSrc.keyword arguments:bind_type (default:‘bind’): the type of binding to use. Possible values are:bind,one-way,two-way.find_elements_by_bindingReturn the list of all the elements matching the specified binding. Seefind_element_by_bindingfor details.Full ExampleYou can have a look at the example scriptin selenium_aurelia/test/example.py.IssuesYou can report issues onthe issues tracker.Changelogv0.1.1Add option to wait after navigation (wait_on_navigationin constructor andwaitin thenavigatemethod).v0.1.0Initial release.
Package: selenium-authenticated-proxy
Selenium Authenticated Proxy HelperOverviewThe Selenium Authenticated Proxy Helper is a Python utility designed to seamlessly handle proxy authentication when using Selenium WebDriver. This package generates a Chrome extension that takes care of proxy authentication, allowing you to focus more on web scraping or automation tasks, without worrying about the intricacies of proxy setup.FeaturesProxy Authentication: Supports username and password authentication for proxy servers.Unique Identification: Generates a unique Chrome extension for each different set of proxy credentials.Ease of Use: Simple API to generate and use the extension with your existing Selenium Chrome WebDriver setup.Temporary Storage: Optionally, specify a folder for temporary storage of generated Chrome extensions.RequirementsPython 3.6 or higherSelenium WebDriverInstallationYou can install this package via pip:pipinstallselenium-authenticated-proxyUsageBasic UsageHere is how you can set up the authenticated proxy for Selenium's Chrome WebDriver:fromseleniumimportwebdriverfromselenium_authenticated_proxyimportSeleniumAuthenticatedProxy# Initialize Chrome optionschrome_options=webdriver.ChromeOptions()# Initialize SeleniumAuthenticatedProxyproxy_helper=SeleniumAuthenticatedProxy(proxy_url="http://username:password@proxy-server.com")# Enrich Chrome options with proxy authenticationproxy_helper.enrich_chrome_options(chrome_options)# Start WebDriver with enriched optionsdriver=webdriver.Chrome(chrome_options=chrome_options)# Your automation or scraping code hereCustom Temporary FolderYou can specify a custom folder for temporary storage of generated Chrome extensions.proxy_helper=SeleniumAuthenticatedProxy(proxy_url="http://username:password@proxy-server.com",tmp_folder="/path/to/tmp/folder")To enable the authentication to work properly a chrome extension is being generated (Thanks toitsmnthnwith animprovement for manifest v3).
If the URl doesn't change the extension will not be regenerated. The URL is hashed so that only when the URL has changed (or the tmp folder has changed) a new zip file will be generated.LicenseThis project is licensed under the MIT License - see the LICENSE.md file for details.
Package: selenium-chrome
selenium_chromeDescriptionUser-friendly implementation of a chrome based selenium clientFeaturesEasily create a firefox selenium webdriver with proxy(host/port), extensions and other settings, such as, full-screen-window,
private session.Override user-agentEasily save and load cookies for websitesprotects against bot-detection, because it uses undetected-chromedriverInstallpipinstallselenium_chrome# orpip3installselenium_chromeUsagefromselenium_chromeimportChromechrome=Chrome()chrome.get('https://www.google.com')importtimetime.sleep(999)Dependencieskproxy,selenium,selenium-browser,undetected-chromedriver,xpath-utils
Package: selenium-chrome-screenshot
A Python ChromeDriver wrapper that takes full page screenshots.
ChromeScreenshot
================TODOWrite deterministic testsCI jobs. Travis?
- enfore PR pass testsProduce documentationpypi packagebadgesInstallationTODODocumentationTODOContributingTODOLicenseCopyright 2016 Grant Welch

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: selenium-cmd
selenium-cmdselenium-cmd is a small tool with which you can perform basic actions using a selenium webdriver object.table of contentsinstallationusagecommandsgetexitclickextractselectwriteinstallationYou can simply usepip install selenium-cmdusageYou can use the SeleniumCmd class wherever you want in your script.You can do so by importing SeleniumCmd from selenium_cmd.from selenium_cmd import SeleniumCmd

SeleniumCmd(your_driver).cmdloop()If you do not provide your own driver, SeleniumCmd will instantiate one usingChrome()fromselenium.webdriver.This will open a prompt where you can type your commands looking like this:selenium-cmd version 0.0.2
>commandsgetWith get you can navigate to different websites.The following will navigate tohttp://example.com:>get http://example.comexitTheexitcommand will stop the execution of SeleniumCmd and continue with your regular program execution.>exitclickTheclickcommand will click the first element found specified by an XPath.The following example will click the first link onhttp://example.com:>get http://example.com
>click //aextractTheextractcommand will print all elements matched by the provided XPath expression to your command line.The following example will print all quotes fromhttps://quotes.toscrape.com/:>get https://quotes.toscrape.com/
>extract //span[@class="text"]/text()
1 The world as we have created it is a process of our thinking. It cannot be changed without changing our thinking.
2 It is our choices, Harry, that show what we truly are, far more than our abilities.
3 There are only two ways to live your life. One is as though nothing is a miracle. The other is as though everything is a miracle.
4 The person, be it gentleman or lady, who has not pleasure in a good novel, must be intolerably stupid.
5 Imperfection is beauty, madness is genius and it's better to be absolutely ridiculous than absolutely boring.
6 Try not to become a man of success. Rather become a man of value.
7 It is better to be hated for what you are than to be loved for what you are not.
8 I have not failed. I've just found 10,000 ways that won't work.
9 A woman is like a tea bag; you never know how strong it is until it's in hot water.
10 A day without sunshine is like, you know, night.selectThe syntax for the select command is:select xpath optionTheselectcommand will select an option by value from a select tag. The select tag needs to be specified by an XPath expression.The following example will select the option "css" in the first select tag onhttps://www.w3docs.com/learn-html/html-select-tag.html:>get https://www.w3docs.com/learn-html/html-select-tag.html
>select //select[@aria-label="Books"] csswriteThe syntax for the write command is:write xpath textThewritecommand will write text to a text input field as specified. Text that contains whitespace must be enclosed in quotation marks.The following example will write "Hello World!" in the search box ofhttps://developer.mozilla.org/>get https://developer.mozilla.org/
>write //input[@id="main-q"] "Hello World!"
Package: selenium-configurator
This library provide an helper api for selenium launchers. it prepares multiple
selenium web drivers from a configuration file. This aims to help launchers to
run 1 task over multiple browsers through various selenium web drivers (local,
grid, cloud provider…).ResourcesDocumentationIssue TrackerCodeLicence0.1.1 (2019-07-24)Ignore InvalidSessionIdException while quitting webdriverDo not use deprecated assert methodSupport version 3Use geckodriver to test firefox0.1 (2016-06-15)Initial version
Package: selenium-cookies
Selenium Cookie HandlerWhat does it do?Saves and loads cookies from a given selenium webdriver.Why?Useful for storing user information amongst other things. This is
actually ripped from my myNotifsV2 project where I save & load cookies in
order to automatically log the user in rather than having them log
in every single time they run the application.Installationpipinstallselenium_cookiesUsagefromseleniumimportwebdriverfromselenium_cookiesimportCookieHandlerdummy_driver=webdriver.Firefox()#   The second argument is the page to go to when saving/loading cookies.#   In some cases this is necessary for the loading and saving of cookies#   to actually work. If you don't have this issue, you can just set it to None.cookie_handler=CookieHandler(dummy_driver,"https://github.com/adamhb123/selenium_cookies",overwrite=False,filename="cooks",wait_time=5)#   save_cookies() saves the site cookies to the specified filesaved_cookies=cookie_handler.save_cookies()#   load_cookies() loads the saved cookies from the given file (or from the most recently saved one)loaded_cookies=cookie_handler.load_cookies()print("Saved cookies == loaded cookies == cookie_handler.loaded_cookies: "+str(saved_cookies==loaded_cookies==cookie_handler.loaded_cookies))Should you so choose, there is also a basic test available in selenium_cookies.tests:fromseleniumimportwebdriverfromselenium_cookies.testsimporttest_moduledummy_driver=webdriver.Firefox()# could also be webdriver.Chrome()#   If the driver argument is not supplied, test_module.test attempts to create#   the webdriver.Firefox instance with the locally stored geckodriver (0.27.0).test_module.test(driver=dummy_driver)
Package: selenium-crawler-template
Selenium Crawler TemplateBoilerplate for developing crawler with Selenium.Installationpipinstallselenium-crawler-templateUsagefromselenium_crawler_templateimportCrawlerclassMyCrawler(Crawler):@Crawler.open_url_in_new_tabdef_get_email_from_profile(self,_):returnself.find_element('a#email').get_attribute('href')defcrawl(self,**kwargs):self.driver.get(kwargs['url'])forprofileinself.find_elements('ul > .profile'):_=self._get_email_from_profile(profile.get_attribute('href'))self._scroll_to_bottom()