场景是这样的:1,先登录百度2,点击上传本地文件实际场景是点击上传本地文件的按钮后才会出现选定文件的框框
我根据实际场景写了这几行代码:
window=driver.find_element_by_xpath(".//[@id='WKFlashUploader']/embed").click() //点击上传文件按钮window.send_keys("C:UsersliliDesktopbaidu.txt")//
报了这样的错误
教程是这样的:
哪里不对劲呢
ringa_lee
.After click(), the window is the return result of the click() method. If there is no return, the window is None and cannot send_keys
File upload has been implemented through win32gui
I use the key wizard, you can also use win32gui
First check the window handle to be empty. If it is empty, it will not be processed
.After click(), the window is the return result of the click() method. If there is no return, the window is None and cannot send_keys
File upload has been implemented through win32gui
I use the key wizard, you can also use win32gui
First check the window handle to be empty. If it is empty, it will not be processed