Пример #1
0
 class TestPage(PageObject):
     test_elem1 = page_element(css='foo')
     test_elem2 = page_element(css='bar')
Пример #2
0
def test_page_element_bad_args():
    with pytest.raises(ValueError):
        page_element()
    with pytest.raises(ValueError):
        page_element(id_='foo', xpath='bar')
Пример #3
0
def test_page_element_bad_args():
    with pytest.raises(ValueError):
        page_element()
    with pytest.raises(ValueError):
        page_element(id_='foo', xpath='bar')
Пример #4
0
def test_page_element():
    elem = page_element(css='foo')
    assert elem.locator == (By.CSS_SELECTOR, 'foo')
    assert inspect.isclass(PageElement)
Пример #5
0
def test_page_element():
    elem = page_element(css='foo')
    assert elem.locator == (By.CSS_SELECTOR, 'foo')
    assert inspect.isclass(PageElement)