【问题标题】:Automate file browse action using chrome extension使用 chrome 扩展自动执行文件浏览操作
【发布时间】:2017-12-19 10:19:49
【问题描述】:

有没有办法使用 chrome 扩展自动浏览文件并选择 HTML 输入 FileUpload 对象的操作?

就像 selenium 中的“sendkeys”。 (driver.FindElement(By.Id("Update_file")).SendKeys(DS_File))

chrome 扩展也支持“sendkeys”吗?

【问题讨论】:

    标签: html google-chrome automation filebrowse


    【解决方案1】:

    您想模拟用户在文件选择器中选择文件的操作吗?因为那是不可能的。 唯一有效的是 sendKeys,但正如您已经提到的,我不确定您要求的是什么。

    看看https://saucelabs.com/resources/articles/best-practices-tips-selenium-file-upload

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-06-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-05
      • 1970-01-01
      相关资源
      最近更新 更多