Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
python中Selenium Webdriver中的NoTouchElementException_Python_Selenium_Xpath_Nosuchelementexception - Fatal编程技术网

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版本的代码。您可以添加一些您尝试过的代码以及您想要定位的代码吗。你的解释不清楚