I am trying to use Selenium to get all element in the list ::before pseudo-element. I can't save data into the list.
Scenario: I want to all data into the list where data in li and a tag
Here is what the DOM looks like:
I am using selenium + python
This code is hovering to main category nav 'Women':
element_to_select = driver.find_element_by_xpath("//*[@id='nico-main-header']/nav/ul/li[1]")
hover = ActionChains(driver).move_to_element(element_to_select)
hover.perform()
driver.implicitly_wait(15)
Print all li achor tag :
ele = driver.find_element_by_css_selector("ul .row .col-md-3:first-child ul li")
print(ele)
** but li anchor tag is not coming while printing the ele.