def del_text(driver,loc): ''' 手动删除文本框的文本 :param driver: :param loc: :return: ''' ele_name1 = get_element(driver,loc)
# 这里是因为设置了Unicode编码键盘
# "unicodeKeyboard":True,#使用uncode编码键盘
text = ele_name1.get_attribute("text").encode('utf-8')
text = text.decode('utf-8')
ele_name1.click()
for i in range(0, len(text)):
driver.press_keycode(67)