def TypeIn(cls, value):
"""
input value without clear existed values
"""
if value == "":
return
log.step_normal(u"Element [%s]: TypeIn Value [%s]." % (cls.__name__, value))
# cls.__wait()
WebDriverWait(env.driver, 10).until(lambda the_driver:
the_driver.find_element(cls.by, cls.value).is_displayed())
elements = env.driver.find_elements(cls.by, cls.value)
action = webdriver.ActionChains(env.driver)
action.send_keys_to_element(elements[cls.index], value)
action.perform()
cls.__clearup()
评论列表
文章目录