如何使用java在selenium webdriver中测试将文件从桌面拖动到浏览器?我知道我们可以做在we,但我们还没有准备好商业化的产品。
发布于 2015-05-21 14:15:18
也许使用PyWinAuto你可以做到这一点,但它不会保持一致,因为Pywinauto不支持基于网络的应用程序。
Steps Can be-
Step 1 - Minimize ur browser using Pywinauto Window.Minimize Method.
Step 2- Mouse Click and Hold on the Icon
Step 3 - Maximize ur Broser using Window.Maximize
Step 4- Click on any coordinate on the browser and release the mouse.但这可能不是一个完全有效的解决方案。
发布于 2015-05-21 15:12:26
对于此场景,请尝试使用Autoit。
看看这个:http://seleniumeasy.com/selenium-tutorials/upload-a-file-using-selenium-webdriver-with-autoit
发布于 2015-05-21 22:01:32
Attach()
Func Attach()
WinWait("Open")
While True
$win = WinWait("Open", "")
ControlFocus($win, "", "Open")
Send("{t 1}")
Send("{e 1}")
Send("{s 1}")
Send("{t 1}")
Send("{. 1}")
Send("{p 1}")
Send("{n 1}")
Send("{g 1}")
Sleep(2000)
ControlClick($win, "", "[CLASS:Button; INSTANCE:1]")
WinWaitClose($win)
Wend
EndFunc
https://stackoverflow.com/questions/30363946
复制相似问题