quilla.steps.validations package¶
Submodules¶
quilla.steps.validations.url module¶
- class quilla.steps.validations.url.URLValidation(ctx, target, state, parameters, driver=None)¶
Bases:
quilla.steps.base_steps.BaseValidation
Class defining the behaviour for performing URL validations
- Parameters
ctx (
Context
) – The runtime context for the applicationtarget (
str
) – The URL to perform the validation withstate (
URLValidationStates
) – The desired state of the target urldriver (
Optional
[WebDriver
]) – An optional argument to allow the driver to be bound at object creation.
- perform()¶
Performs the correct action based on what is defined within the selector, and returns the resulting report produced.
- Return type
- Returns
A report summarizing the results of the executed validation
- property url: str¶
The current URL of the browser
- Raises
NoDriverException – If the driver is not currently bound to this step
- Return type
str
quilla.steps.validations.validation_factory module¶
- class quilla.steps.validations.validation_factory.Validation¶
Bases:
quilla.steps.base_steps.BaseStepFactory
Factory class for the different validations
- classmethod from_dict(ctx, validation_dict, driver=None)¶
From a validation dict, produces the appropriate validation object
- Parameters
ctx (
Context
) – The runtime context for the applicationvalidation_dict (
Dict
[str
,Union
[str
,ValidationStates
,ValidationTypes
]]) – A dictionary containing the definition of a validation, including the target, state, and type of validation to be performeddriver (
Optional
[WebDriver
]) – The driver that will be connected to the validation, if any
- Return type
- Returns
Validation object of the type requested in the validation dictionary
- validation_selector: Dict[quilla.common.enums.ValidationTypes, Type[quilla.steps.base_steps.BaseValidation]] = {<ValidationTypes.XPATH: 'XPath'>: <class 'quilla.steps.validations.xpath.XPathValidation'>, <ValidationTypes.URL: 'URL'>: <class 'quilla.steps.validations.url.URLValidation'>}¶
quilla.steps.validations.xpath module¶
- class quilla.steps.validations.xpath.XPathValidation(ctx, target, state, parameters, driver=None)¶
Bases:
quilla.steps.base_steps.BaseValidation
Class defining the behaviour for performing XPath validations
- Parameters
ctx (
Context
) – The runtime context for the applicationtarget (
str
) – The XPath of the element to perform the validation againststate (
XPathValidationStates
) – The desired state of the target web elementdriver (
Optional
[WebDriver
]) – An optional argument to allow the driver to be bound at object creation.