editbox = driver.find_element_by_id("id") editbox.click() content = editbox.get_attribute("text") driver.keyevent(123)#光标定位到末尾 for i in range(0,len(content)): driver.keyevent(67)#backspace
时间: 2024-11-05 23:27:50
editbox = driver.find_element_by_id("id") editbox.click() content = editbox.get_attribute("text") driver.keyevent(123)#光标定位到末尾 for i in range(0,len(content)): driver.keyevent(67)#backspace