Skip to main content

This package is used for setting up base locales.

Project description

Package mybase-lucien

This package is used for setting up base locales.

Pay attention, this package does not require the dependency of selenium while being installed by pip, but selenium is required to be installed if myselenium is imported.

To install:

pip install mybase-lucien

To import:

import mybase_lucien

Module myip

This deals the problems with ip adresses.

Import

from mybase_lucien import myip

Function get()

It gets current outbound ip address.

  • usage
    ip = myip.get()
    
  • arguments
    There are no arguments.
  • returned value
    A string value, which is the ip address. It would be empty if the program fails to fetch the ip address.

Module mylocale

This checks the current operating locales.

Import

from mybase_lucien import mylocale

Function is_exec()

This determines whether the currently running program is a script file run by the python interpreter or a packaged application.

  • usage
    is_executable = mylocale.is_exec()
    
  • arguments
    There are no arguments.
  • returned value
    A bool value, indicating if this is a packaged application (True for yes).

Function get_dir()

This fetches the directory the script file or the packaged application is located.

  • usage
    mydir = mylocale.get_dir()
    
  • arguments
    There are no arguments.
  • returned value
    A string value which is the directory mentioned above.

Module myselenium

This provides easy-to-use multi-browser support based on the package selenium.
Pay attention: selenium must be installed first using:

pip install selenium

Import

from mybase_lucien import myselenium

Function get_options(browser)

This returns a browser options object.

  • usage
    options = myselenium.get_options(browser=myselenium.Browser.Chrome)
    
  • arguments
    • browser
      A string value which represents certain browser types, which can be choose from:
      # Chrome
      myselenium.Browser.Chrome
      # Edge
      myselenium.Browser.Edge
      # Firefox
      myselenium.Browser.Firefox
      
  • returned value
    A browser options object.

Function init_browser(browser,*args,**kwargs)

This initiates a driver of the given browser.

  • usage
    driver = myselenium.init_browser(browser=myselenium.Browser.Chrome,'/path/to/chromedriver',options=options)
    
  • arguments
    • browser
      A string value which represents certain browser types, which can be choose from:
      # Chrome
      myselenium.Browser.Chrome
      # Edge
      myselenium.Browser.Edge
      # Firefox
      myselenium.Browser.Firefox
      
    • Other arguments
      Any argument that can be used when initializing a webdriver.
  • returned value
    A webdriver instance of the given browser.

Function clickx(driver,ele)

This operates the driver to click on the certain element found by xpath.

  • usage
    clickx(driver,ele)
    
  • arguments
    • driver
      A webdriver instance.
    • ele
      A string value which is the xpath of a certain element.
  • returned value
    There are no returned values.

Function enterx(driver,ele)

This operates the driver to input words to the certain element found by xpath.

  • usage
    enterx(driver,ele)
    
  • arguments
    • driver
      A webdriver instance.
    • ele
      A string value which is the xpath of a certain element.
  • returned value
    There are no returned values.

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

mybase-lucien-2.1.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

mybase_lucien-2.1.2-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file mybase-lucien-2.1.2.tar.gz.

File metadata

  • Download URL: mybase-lucien-2.1.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for mybase-lucien-2.1.2.tar.gz
Algorithm Hash digest
SHA256 87bf5da67987107bc94c2347e6ce52ccc778e257bbd458aec0b0b4dff11ab277
MD5 b9f0cbc5e3557699a8add986acd5d92f
BLAKE2b-256 57b6b7062391a046e66fda4ffeff99ab33e4b55e34e29b55eb4a96bbb5baa816

See more details on using hashes here.

File details

Details for the file mybase_lucien-2.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mybase_lucien-2.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 25b12a4131d1fc5ac4abe3b4c41346b176adec163d063150f0c22e9cbff0e5a5
MD5 6a75ce387ea96cc18b6964e9dac4d401
BLAKE2b-256 d184e57cd51ef3d32e0e6ab06ce5c0ebc7435364603ab94f916a5f6f2a1ae42c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page