简体   繁体   English

如何使用seleniumgrid在linux机器中上传文件

[英]how to upload file in linux machine using seleniumgrid

I had this piece of code: 我有这段代码:

Element.sendKeys(By.xpath("//input[@id='documentUploadT7Form:documentFileUpload:file']"),
        "C:\\Users\\Public\\Pictures\\Sample Pictures\\Koala.jpg", driver, new WebDriverWait(driver, 60L));

in selenium WC running fine. 在硒WC中运行良好。 When we have changed to "seleniumgrid and Linux" file does not upload any more. 当我们更改为“ seleniumgrid和Linux”时,文件不再上传。

Would you suggest how to upload a file in Linux by using selenium grid? 您是否建议如何使用Selenium网格在Linux中上传文件?

The path you are using is wrong for Linux. 对于Linux,您使用的路径错误。 You would need to store the Koala.jpg file in the linux RC machine and provide that path in the command. 您需要将Koala.jpg文件存储在linux RC计算机中,并在命令中提供该路径。

"C:\\Users\\Public\\Pictures\\Sample Pictures\\Koala.jpg"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 linux 机器上使用 Selenium 远程 webdriver 在弹出窗口中上传文件 - How to upload a file in popup using Selenium remote webdriver on linux machine 如何通过PuTTy使用命令行将文件从Windows机器上传到Linux机器? - How to upload a file from Windows machine to Linux machine using command lines via PuTTy? 使用 PHP 双换行符从 Linux 机器上传文件到 FTP 服务器(但适用于 Windows) - File upload to FTP server from Linux machine using PHP doubles line breaks (but works on Windows) 如何使用java程序访问Linux机器中的文件和目录 - How to access file and directories in Linux machine using java program 如何使用Windows 10在Linux机器上的远程文件上工作? - How to work on a remote file on a linux machine using Windows 10? 如何使用 Pyinstaller 为 Linux 机器创建可执行文件? - How to create an executable file for Linux machine using Pyinstaller? 如何使用C#从Linux机器读取不断增长的文件 - How to read a growing file from a linux machine using c# 如何从Windows 7使用python在远程(linux)机器上创建文件 - How to create an file on remote (linux) machine using python from window 7 自动将文件从Windows机器上传到Linux服务器? - Automatically upload a file from Windows machine to Linux server? 如何在Linux机器中链接静态库文件 - How to link a static library file in Linux machine
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM