python - Selecting div class options in selenium python
问题描述
website code I am trying to auto made on
dots= driver.find_element_by_xpath('//*[@id="yDmH0d"]/div[1]/div/div/div[12]').click()
dup=Select(driver.find_element_by_xpath('/html/body/div[5]'))
dup.select_by_visible_text("Duplicate site")
Hello, I am very new to selenium and automation. I am trying to select an option from a 3 dot menu and can't get it to work. All the tags within it are div classes and if I try to just .click()
it says that it is not interactable. I have tried select feature as well as you can see above but that doesn't seem to work either and tells be that select only works on elements not div. Any recommendations will be greatly appreciated. Thanks.
解决方案
推荐阅读
- mysql - 希望创建一个仅显示一列 MYSQL 的子查询
- laravel - 如何使用 laravel 集体创建 optgroup?
- python - 如果文本以开头和结尾,则从一个文本文件复制到另一个
- python - TensorFlow 2d 直方图
- java - 访问 jasypt 的 FixedStringSaltGenerator 和 setSaltGenerator 生成的 SALT?
- ember.js - 为 ember api 操作自定义适配器
- pipeline - 使用 Luigi 运行具有不同参数和动态依赖关系的相同任务
- javascript - TypeScript:TypeError:App 不是构造函数
- botframework - CardAction DisplayText 似乎不起作用
- corda - 将新节点添加到现有的 Corda 网络