In a webpage I am scraping, there is the CSS code:
<span class="err css-bjzkj7">OUT OF STOCK</span>
I want to get the text "OUT OF STOCK" and check to see if it's changed.
What I tried:
from splinter import Browser
driver = Browser('chrome', **executable_path)
driver.visit(url)
driver.find_element_by_css_selector("err css-bjzkj7").text
What I get:
AttributeError: 'WebDriver' object has no attribute 'find_element_by_css_selector'
I read about "xpath" but that throws the same error. Selenium version: 3.141.0