I keep getting the following exception because I cannot find an element. I have tried everything from CSS Selectors to XPATH:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="content"]/div[9]/div"}
Here are screenshots of the structure of the HTML:
It is the highlights div at the end.
I tried:
net_sales = driver.find_element(By.CSS_SELECTOR, "#content > div.tbGrossSalesWithTax.s4 > div")net_sales = driver.find_element(By.XPATH, '//*[@id="content"]/div[9]/div')
Is there a better way to highlight the element?