import pytest

from src.driver_factory import WebDriverUnavailableError
from src.examples import register_example


def test_register_example():
    try:
        message = register_example.run()
    except WebDriverUnavailableError as exc:
        pytest.skip(str(exc))

    assert "Registration successful" in message
