要一直走下去

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

 

 

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可以点击它。

 

posted on 2021-05-31 14:38  要一直走下去  阅读(1571)  评论(0编辑  收藏  举报