Package: pysellure
READMEThis lib implements a lot of methods to use inPython+Selenium+Allureprojects.Common methodsc_logPrints log message to allure reportParams:severityone of the available logging levels (error,warning,info,debug)messageprintable messageExample:c_log('info',f'Message to print')c_screeshotTakes screenshot and attaches it to allure reportParams:browserwebdriver instancenamescreenshot nameExample:c_screeshot(context.browser,'Screenshot')c_waitWaits specified number of seconds for something incredibleParams:delaytime to wait in secondsExample:c_wait(5)c_storeSaves value to variable in storeParams:storestore where to savevariablevariable when to savevaluevalue to be savedExample:c_store(context,123,'var')c_assert_conditionChecks that condition is trueParams:conditioncondition to checkExample:c_assert_condition(condition)c_assert_equalsChecks that expected value equals to real valueParams:expectedvalue that we expectrealactual valueExample:c_assert_equals(expected,real)c_assert_containsChecks that substring contains in stringParams:needlesubstring to containhaystackstring that should containExample:c_assert_contains(needle,haystack)c_assert_matchesChecks that string matches regular expressionParams:stringstring that should matchregexregular expression to searchExample:c_assert_matches(string,regex)c_assert_json_validChecks that the JSON is validParams:jsonDatachecked JSONExample:c_assert_json_valid(jsonData)Frontend methodsf_openOpens specified urlParams:browserwebdriver instanceurlurl to openExample:f_open(context.browser,'http://tested-resource.org/')f_clickClicks on LMB over elementParams:browserwebdriver instanceselectorselector to the elementExample:f_click(context.browser,xc['selector'])f_send_keysTypes text or hits control keys over the elementParams:browserwebdriver instanceselectorselector to the elementvalueinput text or control keyExample:f_send_keys(context.browser,xc['selector'],'Hello')f_assert_enabledChecks that the element is enabledParams:browserwebdriver instanceselectorselector to the elementExample:f_assert_enabled(context.browser,xc['selector'])f_assert_not_enabledChecks that the element is not enabledParams:browserwebdriver instanceselectorselector to the elementExample:f_assert_not_enabled(context.browser,xc['selector'])f_assert_displayedChecks that the element is visibleParams:browserwebdriver instanceselectorselector to the elementExample:f_assert_displayed(context.browser,xc['selector'])f_assert_not_displayedChecks that the element is not visibleParams:browserwebdriver instanceselectorselector to the elementExample:f_assert_not_displayed(context.browser,xc['selector'])f_assert_existsChecks that the element is presentedParams:browserwebdriver instanceselectorselector to the elementExample:f_assert_exists(context.browser,xc['selector'])f_assert_not_existsChecks that the element is not presentedParams:browserwebdriver instanceselectorselector to the elementExample:f_assert_not_exists(context.browser,xc['selector'])f_assert_equalsChecks that the attribute of the element equals to the expected valueParams:browserwebdriver instanceselectorselector to the elementattrchecked attributeexpectedexpected valueExample:f_assert_equals(context.browser,xc['selector'],'value','Hello')f_assert_not_equalsChecks that the attribute of the element not equals to the expected valueParams:browserwebdriver instanceselectorselector to the elementattrchecked attributeexpectedexpected valueExample:f_assert_not_equals(context.browser,xc['selector'],'value','Hello')f_assert_containsChecks that the attribute of the element contains the expected valueParams:browserwebdriver instanceselectorselector to the elementattrchecked attributeexpectedexpected valueExample:f_assert_contains(context.browser,xc['selector'],'value','Hello')f_assert_not_containsChecks that the attribute of the element is not contains the expected valueParams:browserwebdriver instanceselectorselector to the elementattrchecked attributeexpectedexpected valueExample:f_assert_not_contains(context.browser,xc['selector'],'value','Hello')Backend methodsb_requestSends request to specified api with specified paramsParams:methodone of the available methods (get,post,put,patch,delete)urlurl to requestdataoptionalDictionary or list of tuplesheadersoptionalDictionary of HTTP Headers to sendfilesoptionalDictionary of'name': file-like-objectsReturn:Response <Response>objectExample:b_request('GET','/reports')b_request('POST','/reports',headers=headers,data=data)