airgun.entities.location

Module Contents

Classes

LocationEntity

ShowAllLocations

Navigate to All Locations page

AddNewLocation

Navigate to Create Location page

EditLocation

Navigate to Edit Location page

SelectLocationContext

Select Location from menu

class airgun.entities.location.LocationEntity(browser)
endpoint_path = /locations
create(values)

Create new location entity

delete(entity_name)

Delete existing location

read(entity_name, widget_names=None)

Read specific location details

search(value)

Search for location entity

update(entity_name, values)

Update necessary values for location

select(loc_name)

Select necessary location from context menu on the top of the page

class airgun.entities.location.ShowAllLocations(obj, navigate_obj, logger=None)

Navigate to All Locations page

VIEW
step(*args, **kwargs)

Describes the work to be done to get to the destination after the prequisite is met.

This is a default and is generally overridden.

class airgun.entities.location.AddNewLocation(obj, navigate_obj, logger=None)

Navigate to Create Location page

VIEW
prerequisite
step(*args, **kwargs)

Describes the work to be done to get to the destination after the prequisite is met.

This is a default and is generally overridden.

class airgun.entities.location.EditLocation(obj, navigate_obj, logger=None)

Navigate to Edit Location page

Parameters

entity_name – name of the location

VIEW
prerequisite(*args, **kwargs)

Describes a step that must be carried our prior to this one.

This often calls a previous navigate_to, often using one of the helpers, NavigateToSibling which will navigate to a given destination using the same object, or NavigateToAttribute which will navigate to a destination against an object describe by the attribute of the parent object.

This is a default and is generally overridden.

step(*args, **kwargs)

Describes the work to be done to get to the destination after the prequisite is met.

This is a default and is generally overridden.

class airgun.entities.location.SelectLocationContext(obj, navigate_obj, logger=None)

Select Location from menu

Parameters

loc_name – name of the location

VIEW
am_i_here(*args, **kwargs)

Describes if the navigation is already at the requested destination.

By default, airgun relies on view’s is_displayed property to determine whether navigation succeeded. If positional argument entity_name was passed and view has BreadCrumb widget, it will also ensure second location in breadcrumb is provided entity name.

This method may be overridden on specific entity’s NavigateStep level for more complex logic if needed.

Returns

whether navigator is at requested destination or not.

Return type

bool

step(*args, **kwargs)

Describes the work to be done to get to the destination after the prequisite is met.

This is a default and is generally overridden.