开发者

Malformed url exception linux local file system

I have been trying to execute a selenium.attachFile command to upload a file开发者_运维百科-

sel.attachFile(dom_locator,"/home/xyz/Desktop/tstfl.txt");

but getting a Malformed URL Exception for the file path specified. The file is present in the linux local file system. Please help me with the proper format of the file path.


Likely what you need is

sel.attachFile(dom_locator,"file:///home/xyz/Desktop/tstfl.txt");

For an explanation of file uris, see File URI scheme in wikipedia.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜