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 application

  • target (str) – The URL to perform the validation with

  • state (URLValidationStates) – The desired state of the target url

  • driver (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

ValidationReport

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 application

  • validation_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 performed

  • driver (Optional[WebDriver]) – The driver that will be connected to the validation, if any

Return type

BaseValidation

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 application

  • target (str) – The XPath of the element to perform the validation against

  • state (XPathValidationStates) – The desired state of the target web element

  • driver (Optional[WebDriver]) – An optional argument to allow the driver to be bound at object creation.

Module contents