When I access the chrome://settings/help
site and tried to access the latest version of Google through Xpath or other channels, I couldn't access it.
I just want to get the string of the latest version of Chrome.
Are there any reasons or specific cases for not recognizing xpath?
Error:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="main"]//settings-about-page//settings-section[1]/div[2]/div[2]/div[2]"} (Session info: chrome=114.0.5735.199);
please. help.
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
import time
service = Service(executable_path="chromedriver")
options = webdriver.ChromeOptions()
options.add_argument('start-maximized')
driver = webdriver.Chrome(service=service, options=options)
driver.get('chrome://settings/help')
time.sleep(5)
update_check = driver.find_element(By. XPATH, '//*[@id="main"]//settings-about-page//settings-section[1]/div[2]/div[2]/div[2]').text
print(update_check)