WebDriver upload file
作者: Max.Bai
时间: 2014/07
WebDriver upload file is easy than selenium RC
string sFilePath = @"c:\temp\file.txt";
string sNetFilePath = @"\\192.168.0.2\folder\file.txt";
string sBrowserID = "UploadFileBtn";
driver.FindElementByID(sBrowserID).SendKeys(sFilePath);
Selenium RC upload file:
http://blog.youkuaiyun.com/max229max/article/details/18817649

本文介绍了使用WebDriver进行文件上传的方法,相较于Selenium RC更为简便。通过示例代码展示了如何定位上传按钮并发送文件路径。
416

被折叠的 条评论
为什么被折叠?



