def test_page_element_bad_args():
    with pytest.raises(ValueError):
        page_element()
    with pytest.raises(ValueError):
        page_element(id_='foo', xpath='bar')
def test_page_element():
    elem = page_element(css='foo')
    assert elem.locator == (By.CSS_SELECTOR, 'foo')
    assert inspect.isclass(PageElement)