【问题标题】:Upload picture in selenium without input[type="file=] element在没有 input[type="file=] 元素的情况下上传 selenium 中的图片
【发布时间】:2021-10-05 18:29:52
【问题描述】:

我正在尝试自动化在remove.bg 上上传图片的过程,但我无法在检查元素中找到文件的输入字段。我知道通过使用 input 和 send_keys 我们可以自动执行此操作,但在这种情况下,当输入字段不可见时我应该怎么做。这是我到目前为止所尝试的。

from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
from selenium import webdriver

driver = webdriver.Firefox()
test = driver.get("https://www.remove.bg/upload")

input = driver.find_element_by_xpath('//input[@type="file"]')
print (input)

#send_keys below.

【问题讨论】:

    标签: python python-3.x selenium web


    【解决方案1】:

    它看起来像是一个生产系统。您是否有权自动化此网站?

    【讨论】:

      猜你喜欢
      • 2019-08-22
      • 2021-11-26
      • 2019-01-24
      • 2018-06-01
      • 1970-01-01
      • 1970-01-01
      • 2019-07-24
      • 2021-10-16
      • 1970-01-01
      相关资源
      最近更新 更多