textbox = driver.find_element_by_xpath(".//div[@role='textbox']/p[1]") driver.execute_script("arguments[0].textContent = arguments[1];", textbox, "This is a test")