self.wrap_driver.move_to_element(locator=const_xpath.monitor_select)    #鼠标移动到某个区域
target = self.driver.find_element_by_xpath(const_xpath.insurance[1]) #下拉框中的目标元素
self.driver.execute_script("arguments[0].scrollIntoView(false);", target) #移动到下拉框中的目标元素,让selenium可以点击它。

 

相关文章:

  • 2021-12-02
  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-21
  • 2021-12-18
猜你喜欢
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-19
相关资源
相似解决方案