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 公交车和无人机协同运输
  • ¥15 stm32代码移植没反应
  • ¥15 matlab基于pde算法图像修复,为什么只能对示例图像有效
  • ¥100 连续两帧图像高速减法
  • ¥15 组策略中的计算机配置策略无法下发
  • ¥15 如何绘制动力学系统的相图
  • ¥15 对接wps接口实现获取元数据
  • ¥20 给自己本科IT专业毕业的妹m找个实习工作
  • ¥15 用友U8:向一个无法连接的网络尝试了一个套接字操作,如何解决?
  • ¥30 我的代码按理说完成了模型的搭建、训练、验证测试等工作(标签-网络|关键词-变化检测)