It is necessary to fill in the form here https://fedresurs.ru/messages/IsSearching , i.e. for example, fill it out with an "Independent Warranty Release Report". I used to do this:

driver.execute_script( "document.getElementById('ctl00_MainContent_sfMessageType_txtObjectName').setAttribute('Value','Π‘ΠΎΠΎΠ±Ρ‰Π΅Π½ΠΈΠ΅ ΠΎ выпускС нСзависимой Π³Π°Ρ€Π°Π½Ρ‚ΠΈΠΈ')") time.sleep(5) s = driver.find_element_by_xpath('//*[@id="ctl00_MainContent_btnSearch"]') # Кнопка поиск s.click() 

But, apparently, something has changed on the site, and now this method does not work. Tell me, please, how to fill out this form correctly, by what methods?

    1 answer 1

    Your option should work. The id and logic on the site are the same as described. I see no reason to combine the challenge js from selenium.

     driver.find_element_by_id('ctl00_MainContent_sfMessageType_txtObjectName').send_keys('Π‘ΠΎΠΎΠ±Ρ‰Π΅Π½ΠΈΠ΅ ΠΎ выпускС нСзависимой Π³Π°Ρ€Π°Π½Ρ‚ΠΈΠΈ') time.sleep(5) driver.find_element_by_id('ctl00_MainContent_btnSearch').click() 
    • Here through swnd_keys does not work, but it is fine. Through js, the field is filled in, but after clicking on the search button, the data is not updated. Those. I insert the text "Independent Warranty Report", I find a button, click click (), the page is updated - only messages with the selected type should remain, but no, the data remains at odds with - ss_beer