ControlFocus("文件上传", "","Edit1") WinWait("[CLASS:#32770]","",10) ControlSetText("文件上传", "", "Edit1","D:python_workspaceQiangSEAutopic小强测试品牌.jpg") Sleep(2000) ControlClick("文件上传", "","Button1");
up=self.driver.find_element('class name','avatar-uploader-trigger') up.find_element('class name','ant-btn').click() os.system('D:\python_workspace\QiangSEAuto\upload.exe') time.sleep(20)
其他
其实还有其他的解决方法,感兴趣的自行研究吧,比如还可以利用如下的方式:
Python pywin32库,识别对话框句柄,进而操作
SendKeys 库
keybd_event 模拟按键
总结
以上就是python和selenium以及autoit如何实现文件上传功能的图文代码详解的详细内容,更多请关注Gxl网其它相关文章!
查看更多关于python和selenium以及autoit如何实现文件上传功能的图文代码详解的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did81779