How can I extract the value 4
using elementId maxId
in Python.
<input type="hidden" id="maxId" value="4">
Python: 3.11.1, ChromeDriver: 109.0.5414.74
Most probably it would be enough to get the value
attribute:
from selenium import webdriver
from selenium.webdriver.common.by import By
driver = webdriver.Chrome(executable_path='path_to_your_driver')
driver.get("your site")
// Add wait here
driver.find_element(By.ID, "maxId").get_attribute("value")