# 获取当前的页面窗口
first_handle = brower.current_window_handle
handles = brower.window_handles
for i in handles:
    if i != first_handle:
    brower.close()   # 关闭当前窗口
    brower.switch_to.window(i)
    brower.find_element_by_class_name("button1").click()  # 点击提交按钮,提交数据
    time.sleep(2)

  

相关文章:

  • 2022-12-23
  • 2022-02-01
  • 2022-12-23
  • 2021-12-15
猜你喜欢
  • 2022-12-23
  • 2021-07-30
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2021-07-12
  • 2022-12-23
相关资源
相似解决方案