e2e.core

e2e.core.config

class e2e.core.config.E2EConfig(**kwargs)

Bases: object

artifacts_dir_of(node_name: str)
static from_pytest_config(config)

e2e.core.env

class e2e.core.env.Env

Bases: object

get(key: str, default: T | None = None, dtype: Type[T] | None = None) T | str
property is_android: bool
property is_ios: bool
property platform: Platform
class e2e.core.env.Platform(value)

Bases: Enum

An enumeration.

ADR = 'android'
IOS = 'ios'

e2e.core.logger

e2e.core.screen

class e2e.core.screen.Screen(wd: WebDriver)

Bases: UIMixin

Base class for UI assertions and actions. For example, inputting username and password in the login screen, then tapping the login button. A Screen class corresponds to a screen in the app. This helps make test suites more readable.

Following is the example of actions in the login screen:

class LoginScreen(Screen):
    def login(self):
        self.textfield('Username').input('foo')
        self.textfield('Password').input('bar')
        self.button('Login').tap()

e2e.core.simulation

class e2e.core.simulation.Simulation(wd: WebDriver)

Bases: LoggerMixin

Base class for simulations. A simulation is meant for test arrangement. For example, sending an API request to prepare resources, or triggering a push notification, etc.

The recommended way to use a simulation is with the with statement. This way, the cleanup of a simulation (if implemented in the __exit__ method) will be triggered.

with simulation:
    perform_assertions()
run(**kwargs)

Running a simulation. Subclasses need to implement this.

e2e.core.tester

class e2e.core.tester.Tester(wd: WebDriver, source_dir='e2e_ext', **kwargs)

Bases: WDMixin

artifacts_path(fname: str) Path
save_page_source(fname: str | None = None)
take_screenshot(fname: str | None = None)