Skip to content Skip to sidebar Skip to footer

Python Selenium Data-style-name

So there's a bit of html that looks like this

Solution 1:

Solution 2:

Have you try on find_element_by_xpath()?

a_check = browser.find_element_by_xpath("/html/body/a[@data-style-name='Black']")

Which returns:

<selenium.webdriver.remote.webelement.WebElement (session="6c94ac24e0ec3a3320ec21b24055f4fa", element="0.1043557711542944-1")>

Post a Comment for "Python Selenium Data-style-name"