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单击此按钮?_Python_Selenium - Fatal编程技术网

Python 如何使用Selenium Webdriver单击此按钮?

Python 如何使用Selenium Webdriver单击此按钮?,python,selenium,Python,Selenium,及 并得到了错误信息: driver.find_element_by_css_selector("ch4_reviewBtnTopRt").click() 试试这个: NoSuchElementException: Message: Unable to locate element: 试试这个: NoSuchElementException: Message: Unable to locate element: 使用下面的css选择器 driver.find_element_by_css_

并得到了错误信息:

driver.find_element_by_css_selector("ch4_reviewBtnTopRt").click()
试试这个:

NoSuchElementException: Message: Unable to locate element:
试试这个:

NoSuchElementException: Message: Unable to locate element:
使用下面的css选择器

driver.find_element_by_css_selector("input.ch4_btnOrange").click()
您也可以尝试下面的xpath

 input.ch4_btn.ch4_btnOrange.ch4_btnDropShadow.ch4_btnPlaceOrder
使用下面的css选择器

driver.find_element_by_css_selector("input.ch4_btnOrange").click()
您也可以尝试下面的xpath

 input.ch4_btn.ch4_btnOrange.ch4_btnDropShadow.ch4_btnPlaceOrder

为什么要使用
ch4\u reviewbtntort
查找元素?这在您提供的示例html中的任何地方都没有出现。为什么要尝试使用
ch4\u reviewbtntoptrt
来查找元素?这不会出现在您提供的示例html中的任何地方。