How to change innerHTML with python in a selenium firefox window? -


i trying enter string of characters hidden text area on page opened selenium firefox. have gotten return html, have not been able figure out how edit html, able when inspecting element. new coding, please excuse how ignorant may sound.

this html trying type into:

<textarea id = "xxx"           name = "xxx"           class = "xxx"           style = "border  : 1px solid #c1c1c1;                    display : none;                    height  : 40px;                    margin  : 10px 25px;                    padding : 0px;                    resize  : none;                    width   : 250px;"> </textarea> 

i understand want enter needs input between 2 > <, not know how 1. input text there using python, , 2. if text input there there if textarea still set display : none.

if want make text area visible, need make 'display:none' 'display:block' using execute script below. after can send text using sendkeys.

driver = webdriver.firefox() driver.implicitly_wait(20) driver.get("url of page") driver.maximize_window() driver.execute_script("document.getelementbyid('xxx').style.display = 'block';") driver.find_element_by_id("xxx").send_keys("test") 

let me know if have queries


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

android - ConstraintLayout: Realign baseline constraint in case if dependent view visibility was set to GONE -