why doesn't the applied button (button.click()) work in the code?
import time
import undetected_chromedriver as uc
def press_button():
driver = uc.ChromeOptions()
driver.headless=True
driver.add_argument('--headless')
driver = uc.Chrome(options=driver)
driver.get('https://kad.arbitr.ru/')
time.sleep(5)
try:
inn_field = driver.find_element("xpath", '//*[@id="sug-participants"]/div/textarea')
inn_field.send_keys('772000581641')
button = driver.find_element("xpath", '//*[@type="submit"]')
button.click()
time.sleep(5)
except:
driver.close()
driver.quit()
if __name__ == '__main__':
press_button()
at the same time, the inn_field field is filled in correctly. Also, if I'm not doing all this in headless mode, then everything goes fine ...