python中Selenium Webdriver中的NoTouchElementException
python中Selenium Webdriver中的NoTouchElementException,python,selenium,xpath,nosuchelementexception,Python,Selenium,Xpath,Nosuchelementexception,div class=“行流体”> 挑选·报告:· ·日期·范围:· 据我所知,您希望选择下拉列表。使用python中的以下代码选择下拉值 from selenium.webdriver.support.ui import Select select = Select(driver.find_element_by_xpath("//select[@class='select_report_type ng-pristine ng-untouched ng-valid']")) sele
div class=“行流体”>
挑选·报告:·
·日期·范围:·
据我所知,您希望选择下拉列表。使用python中的以下代码选择下拉值
from selenium.webdriver.support.ui import Select
select = Select(driver.find_element_by_xpath("//select[@class='select_report_type ng-pristine ng-untouched ng-valid']"))
select.select_by_index(1)
// OR
select.select_by_visible_text("text")
// OR
select.select_by_value(value)
如果仍然面临相同的问题或任何其他问题,请告诉我,而不是描述您在发布实际代码时尝试过的内容。另外,将html作为文本而不是图像发布。现在添加了html版本的代码。您可以添加一些您尝试过的代码以及您想要定位的代码吗。你的解释不清楚