You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I try to initialize the VerticalNavigation with a CSS locator like this: nav = VerticalNavigation(locator=(Locator(css='.nav-pf-vertical')))
Then the function nav.select('Bar') does not work, and it cannot find the element to select it. It then returns the following error:
selenium.common.exceptions.NoSuchElementException:
Message: Could not find an element './ul/li/a[span[normalize-space(.)="Bar"] or @href="Bar"]'
The above error implies that it is starting from the top div nav-pf-vertical, but it is not when searching the ./ul/li/a/span path. Rather, the select() function works properly when I initialize the VerticalNavigation with the HTML tag directly below, of the list-group class in the ul tag: nav = VerticalNavigation(locator=(Locator(css='.list-group')))
The select() function then behaves normally. I believe that either the function needs to be refactored to only search starting from the parent of the <ul> tag, or the search needs to check for both possibilities.
The text was updated successfully, but these errors were encountered:
I have the following HTML which describes a patternfly vertical navigation:
If I try to initialize the
VerticalNavigation
with a CSS locator like this:nav = VerticalNavigation(locator=(Locator(css='.nav-pf-vertical')))
Then the function
nav.select('Bar')
does not work, and it cannot find the element to select it. It then returns the following error:The above error implies that it is starting from the top div
nav-pf-vertical
, but it is not when searching the./ul/li/a/span
path. Rather, theselect()
function works properly when I initialize theVerticalNavigation
with the HTML tag directly below, of thelist-group
class in theul
tag:nav = VerticalNavigation(locator=(Locator(css='.list-group')))
The
select()
function then behaves normally. I believe that either the function needs to be refactored to only search starting from the parent of the<ul>
tag, or the search needs to check for both possibilities.The text was updated successfully, but these errors were encountered: