Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/16.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/list/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
下拉菜单不显示';t响应select-selenium python_Python_Python 3.x_Selenium_Selenium Webdriver - Fatal编程技术网

下拉菜单不显示';t响应select-selenium python

下拉菜单不显示';t响应select-selenium python,python,python-3.x,selenium,selenium-webdriver,Python,Python 3.x,Selenium,Selenium Webdriver,我正在使用Selenium用Python做一个项目。当我尝试使用选择来获取选项时,看起来下拉菜单完全被选中了。 我从谷歌网站上得到了这个选项,到目前为止,它已经奏效了 这是我的代码: # Marca select = Select(WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, '/html/body/form/div[3]/div[2]/div[1]/div[4]/div/div[2]/div[1]/d

我正在使用Selenium用Python做一个项目。当我尝试使用选择来获取选项时,看起来下拉菜单完全被选中了。 我从谷歌网站上得到了这个选项,到目前为止,它已经奏效了

这是我的代码:

# Marca
select = Select(WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, '/html/body/form/div[3]/div[2]/div[1]/div[4]/div/div[2]/div[1]/div[2]/div[2]/div/select'))))
select.select_by_visible_text(googleSheet.marca)
time.sleep(r)

# Modelo
select = Select(WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, '/html/body/form/div[3]/div[2]/div[1]/div[4]/div/div[2]/div[1]/div[3]/div[1]/div/span/select'))))
select.select_by_visible_text(googleSheet.modelo)
time.sleep(r)

# Versão
select = Select(WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, '/html/body/form/div[3]/div[2]/div[1]/div[4]/div/div[2]/div[1]/div[3]/div[2]/div/div/select'))))
select.select_by_visible_text(googleSheet.versao)
有人能告诉我我做错了什么吗? 谢谢