douyan6742 2013-02-28 23:19
浏览 36
已采纳

PHP Web驱动程序方法将文件上传到运行Selenium2 RC的远程机器?

I have a standalone selenium RC on a machine. When I run tests, I would like to send a file over to that machine for upload.

Currently, in order to do this I have a predefined directory that I upload files to via rsync. My test code rsyncs the file over to the directory in the remote machine, then uses sendKeys() to send the remote file location to an input element in the DOM.

Obviously, this is not scalable as it does not take machine OS into account in any way, among other things. Does the standalone RC support FTP or using files from a URL as src to upload? Or is the feature that I'm looking for solely in the Java Selenium2 webdriver (Local file detector class)?

  • 写回答

1条回答 默认 最新

  • dongwu1410 2013-03-01 16:47
    关注

    This is more or less the answer

    The problem now is that the files need to be extracted out of the ZIP archive.

    Edit 6/2/2013: The RC automatically extracts the contents of the ZIP archive and returns the file path on the remote machine in the JSON response.

    Related:

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 maple软件,用solve求反函数出现rootof,怎么办?
  • ¥50 汇编语言除法溢出问题
  • ¥65 C++实现删除N个数据列表共有的元素
  • ¥15 Visual Studio问题
  • ¥15 state显示变量是字符串形式,但是仍然红色,无法引用,并显示类型不匹配
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波