python - Python Selenium 销售组 FB
问题描述
我能帮帮我吗,我在尝试获取 div 以在 Facebook 的销售组上上传图片时遇到问题。
我已经有一个python代码,可以以销售组的形式编写自动文本,但我不能在新版本的facebook中上传图片,1年前这是可能的,但现在facebook没有输入文件
之前的代码如下
**photo_element = driver.find_element(By.XPATH,'//input[@type="file"]')
photo_element.send_keys(photo)**
但这现在不行,我试过这种方式,但在facebook搜索引擎中只添加路线的文本
新代码
photo_element = driver.find_element(By.XPATH,'//*[@aria-label="Agregar fotos"]')
photo_element.send_keys(photo)
解决方案
推荐阅读
- android - 无法创建变体“android-manifest-metadata”
- python - 为二进制分类调整 tensorflow LSTM 代码
- php - 获取除静态属性外的所有属性
- .net - 使用 BinaryFormatter 反序列化未知类型的 .NET 对象
- ios - PDFKit 出现错误 -[PDFView setAutoScales:]: unrecognized selector sent to instance
- certificate - WinSCP - 自动接受任何证书
- jmeter - jmeter中时间戳的参数化
- javascript - 不和谐马尔可夫链
- android - 错误:当我们开始生成发布构建时,android定义的类与Android现在提供的类冲突
- javascript - AJAX:如何读取 JSON 数据