Can't locate and click on a terms of conditions button

I am new to pupeeteer and first what i am trying to do is loading a page and clicking on a button. However, it can’t locate the element. I assume this is because I need to locate the parent or parent’s parent element. <button role="button" data-testid="uc-accept-all-button" class="sc-gsDKAQ fHGlTM" style="border: 2px solid rgb(247, 196, 0); padding:… Read More Can't locate and click on a terms of conditions button

AttributeError: 'WebDriver' object has no attribute 'find_element_by_xpath'

from selenium import webdriver import time test = webdriver.Chrome() test.get(‘https://docs.google.com/forms/d/e/1FAIpQLSeYUmAYYZNtbU8t8MRxwJo- d1zkmSaEHodJXs78RzoG0yFY2w/viewform’) time.sleep(5) Name = ‘kuch bhi’ last = test.find_element_by_xpath(‘//*[@id="mG61Hd"]/div[2]/div/div[2]/div[1]/div/div/div[2]/div/div[1]/div/div[1]/input’) last.send_keys(Name) When i execute the code, I get an error that says, AttributeError: ‘WebDriver’ object has no attribute ‘find_element_by_xpath’ >Solution : Selenium just removed that method in version 4.3.0. See the CHANGES: https://github.com/SeleniumHQ/selenium/blob/a4995e2c096239b42c373f26498a6c9bb4f2b3e7/py/CHANGES Selenium 4.3.0 *… Read More AttributeError: 'WebDriver' object has no attribute 'find_element_by_xpath'