This is my code:
from selenium import webdriver
from selenium.webdriver.support.ui import Select
import random
import time
from selenium.common.exceptions import NoSuchElementException
driver = webdriver.Chrome()
driver.get("https://www.ti.com/store/ti/en/p/product/?p=CD4040BE&keyMatch=CD4040BE")
time.sleep(1)
accept_and_proceed = driver.find_element_by_xpath('//*[@id="consent_prompt_submit"]')
accept_and_proceed.click()
region = Select(driver.find_element_by_xpath('//*[@id="llc-cartpage-ship-to-country"]'))
region.select_by_visible_text('Italy')
continue1 = driver.find_element_by_xpath('//*[@id="llc-cartpage-ship-to-continue"]')
continue1.click()
On the website there is the word Inventory. How can I detect if the word Inventory is present on the page? If it is present then print x and if it is not refresh the page until it will be