If I set the value to find as a variable, why doesn't it work?

When calling the findProd function with the number 1, everything works correctly. However, if I replace the number 1 with the idToFind variable, the console outputs undefined. Why is this happening? P.S. in my file, if I print idToFind, the result is 1. addToCartButtons.forEach(button => { button.addEventListener(‘click’, (event) => { const idToFind = event.target.dataset.id; let… Read More If I set the value to find as a variable, why doesn't it work?

How do I click a button with selenium

Hello Guys i’m tryng to click a button but is not working. my code is like this: from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By driver = webdriver.Chrome() driver.implicitly_wait(0.5) driver.maximize_window() driver.get("https://www.freewayinsurance.com/") driver.implicitly_wait(0.5) element = driver.find_element(By.ID, "zipcode") element.send_keys("60056") element2 = driver.find_element(By.XPATH,"//div[@class=’c-hero-home-radio__form-items’]//button[@Class=’c-button c-button–orange’ and text()=’Start Quote’]") element2.click() I will apreciate if somebody can… Read More How do I click a button with selenium