def test_navigation_select(browser):
    loc = ".//h4[normalize-space(.)='Nav (mixed)']/following::div/nav"
    nav = Navigation(browser, locator=loc)
    nav.select("Link 3 - expandable", "Link 2")
    assert nav.currently_selected == ["Link 3 - expandable", "Link 2"]
    nav.select("Link 1 (not expandable)")
    assert nav.currently_selected == ["Link 1 (not expandable)"]
def test_navigation_select(browser):
    loc = ".//h2[normalize-space(.)='Navigation mixed']/following-sibling::div[1]//nav"
    nav = Navigation(browser, locator=loc)
    nav.select("Link 3 - expandable", "Link 2")
    assert nav.currently_selected == ["Link 3 - expandable", "Link 2"]
    nav.select("Link 1 (not expandable)")
    assert nav.currently_selected == ["Link 1 (not expandable)"]
示例#3
0
def test_navigation_select(browser):
    loc = ".//h4[@id='nav-mixed']/following::div/nav"
    nav = Navigation(browser, locator=loc)
    nav.select("Link 3 - expandable", "Link 2")
    assert nav.currently_selected == ["Link 3 - expandable", "Link 2"]
    nav.select("Link 1 (not expandable)")
    assert nav.currently_selected == ["Link 1 (not expandable)"]
def test_navigation(browser, sample):
    locator, tree, currently_selected = sample
    nav = Navigation(browser, locator=locator)
    assert nav.currently_selected == currently_selected
    assert nav.nav_item_tree() == tree
 class TestView(View):
     ROOT = ".//div[@id='ws-react-c-navigation-mixed']"
     nav = Navigation(locator="./nav")
    class TestView(View):
        ROOT = locator

        nav = Navigation(locator="./nav")
def test_navigation_select(browser):
    nav = Navigation(browser, "Primary Nav Mixed Example")
    nav.select("Link 3 - expandable", "Link 2")
    assert nav.currently_selected == ["Link 3 - expandable", "Link 2"]
    nav.select("Link 1 (not expandable)")
    assert nav.currently_selected == ["Link 1 (not expandable)"]
def test_navigation(browser, sample):
    locator, tree, currently_selected = sample
    nav = Navigation(browser, locator=locator)
    assert nav.currently_selected == currently_selected
    assert nav.nav_item_tree() == tree