README
This lib implements a lot of methods to use in Python + Selenium + Allure projects.
Common methods
c_log
Prints log message to allure report
Params:
severityone of the available logging levels (error,warning,info,debug)messageprintable message
Example:
c_log('info', f'Message to print')
c_screeshot
Takes screenshot and attaches it to allure report
Params:
browserwebdriver instancenamescreenshot name
Example:
c_screeshot(context.browser, 'Screenshot')
c_wait
Waits specified number of seconds for something incredible
Params:
delaytime to wait in seconds
Example:
c_wait(5)
c_store
Saves value to variable in store
Params:
storestore where to savevariablevariable when to savevaluevalue to be saved
Example:
c_store(context, 123, 'var')
c_assert_condition
Checks that condition is true
Params:
conditioncondition to check
Example:
c_assert_condition(condition)
c_assert_equals
Checks that expected value equals to real value
Params:
expectedvalue that we expectrealactual value
Example:
c_assert_equals(expected, real)
c_assert_contains
Checks that substring contains in string
Params:
needlesubstring to containhaystackstring that should contain
Example:
c_assert_contains(needle, haystack)
c_assert_matches
Checks that string matches regular expression
Params:
stringstring that should matchregexregular expression to search
Example:
c_assert_matches(string, regex)
c_assert_json_valid
Checks that the JSON is valid
Params:
jsonDatachecked JSON
Example:
c_assert_json_valid(jsonData)
Frontend methods
f_open
Opens specified url
Params:
browserwebdriver instanceurlurl to open
Example:
f_open(context.browser, 'http://tested-resource.org/')
f_click
Clicks on LMB over element
Params:
browserwebdriver instanceselectorselector to the element
Example:
f_click(context.browser, xc['selector'])
f_send_keys
Types text or hits control keys over the element
Params:
browserwebdriver instanceselectorselector to the elementvalueinput text or control key
Example:
f_send_keys(context.browser, xc['selector'], 'Hello')
f_assert_enabled
Checks that the element is enabled
Params:
browserwebdriver instanceselectorselector to the element
Example:
f_assert_enabled(context.browser, xc['selector'])
f_assert_not_enabled
Checks that the element is not enabled
Params:
browserwebdriver instanceselectorselector to the element
Example:
f_assert_not_enabled(context.browser, xc['selector'])
f_assert_displayed
Checks that the element is visible
Params:
browserwebdriver instanceselectorselector to the element
Example:
f_assert_displayed(context.browser, xc['selector'])
f_assert_not_displayed
Checks that the element is not visible
Params:
browserwebdriver instanceselectorselector to the element
Example:
f_assert_not_displayed(context.browser, xc['selector'])
f_assert_exists
Checks that the element is presented
Params:
browserwebdriver instanceselectorselector to the element
Example:
f_assert_exists(context.browser, xc['selector'])
f_assert_not_exists
Checks that the element is not presented
Params:
browserwebdriver instanceselectorselector to the element
Example:
f_assert_not_exists(context.browser, xc['selector'])
f_assert_equals
Checks that the attribute of the element equals to the expected value
Params:
browserwebdriver instanceselectorselector to the elementattrchecked attributeexpectedexpected value
Example:
f_assert_equals(context.browser, xc['selector'], 'value', 'Hello')
f_assert_not_equals
Checks that the attribute of the element not equals to the expected value
Params:
browserwebdriver instanceselectorselector to the elementattrchecked attributeexpectedexpected value
Example:
f_assert_not_equals(context.browser, xc['selector'], 'value', 'Hello')
f_assert_contains
Checks that the attribute of the element contains the expected value
Params:
browserwebdriver instanceselectorselector to the elementattrchecked attributeexpectedexpected value
Example:
f_assert_contains(context.browser, xc['selector'], 'value', 'Hello')
f_assert_not_contains
Checks that the attribute of the element is not contains the expected value
Params:
browserwebdriver instanceselectorselector to the elementattrchecked attributeexpectedexpected value
Example:
f_assert_not_contains(context.browser, xc['selector'], 'value', 'Hello')
Backend methods
b_request
Sends request to specified api with specified params
Params:
methodone of the available methods (get,post,put,patch,delete)urlurl to requestdataoptional Dictionary or list of tuplesheadersoptional Dictionary of HTTP Headers to sendfilesoptional Dictionary of'name': file-like-objects
Return:
Response <Response>object
Example:
b_request('GET', '/reports')
b_request('POST', '/reports', headers=headers, data=data)
Metadata
Release files for pysellure 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pysellure-0.0.4.tar.gz | 5.4 kB | Without provenance | Details for pysellure-0.0.4.tar.gz |
Release files / pysellure-0.0.4.tar.gz
| Download URL | pysellure-0.0.4.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff5235c16b7f189a5f5fd753fb40a2b0c20a96b3fbdba2d6b308fc1e6af33bf2
|
|
BLAKE2b-256 checksum How to use checksums |
bbc74fab58ed49f3e3473dba0c64c44cf27681232e31b4c8966cd4ccaf51f236
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.5
|
Security for pysellure 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.