BuiltInFunctions.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:Zeuz_Python_Node 作者: AutomationSolutionz 项目源码 文件源码
def Enter_Text_In_Text_Box(step_data):
    try:
        sModuleInfo = inspect.stack()[0][3] + " : " + inspect.getmoduleinfo(__file__).name
        Element = LocateElement.Get_Element(step_data,selenium_driver)
        if Element != "failed":
            for each in step_data:
                if each[1]=="action":
                    text_value=each[2]
                    break
                else:
                    continue
            Element.click()
            Element.clear()
            Element.send_keys(text_value)
            Element.click()
            CommonUtil.TakeScreenShot(sModuleInfo)
            CommonUtil.ExecLog(sModuleInfo, "Successfully set the value of to text to: %s"%text_value, 1)
            return "passed"
        else:
            CommonUtil.ExecLog(sModuleInfo, "Unable to locate your element with given data.", 3)
            return "failed"
    except Exception:
        errMsg = "Could not select/click your element."
        return CommonUtil.Exception_Handler(sys.exc_info(),None,errMsg)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号