Skip to content

Commit

Permalink
Notify bad locators + unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Milan Falešník committed Sep 7, 2016
1 parent 172ef2d commit 1c43877
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion testing/test_browser.py
Expand Up @@ -2,7 +2,7 @@
from __future__ import unicode_literals
import pytest

from widgetastic.core.exceptions import NoSuchElementException
from widgetastic.core.exceptions import NoSuchElementException, LocatorNotImplemented


def test_is_displayed(browser):
Expand All @@ -13,6 +13,11 @@ def test_is_displayed_negative(browser):
assert not browser.is_displayed('#invisible')


def test_elements_bad_locator(browser):
with pytest.raises(LocatorNotImplemented):
browser.element(1)


def test_elements_string_locator_xpath(browser):
assert len(browser.elements('//h1')) == 1

Expand Down

0 comments on commit 1c43877

Please sign in to comment.