【问题标题】:Is there any way to set self driver go to relative parent frameusing Python Selenium?有没有办法使用 Python Selenium 设置自我驱动程序转到相对父框架?
【发布时间】:2022-01-22 16:57:53
【问题描述】:

你好,我想设置一个命令,告诉使用 Python 和 Selenium 去相对父框架?

自驱动去相对父框架

【问题讨论】:

    标签: python selenium selenium-webdriver iframe frame


    【解决方案1】:

    要使用 Python 和 Selenium 将焦点切换到相对父级 frame,您可以使用:

    driver.switch_to.parent_frame()
    

    如果parent frame顶级上下文,您也可以使用:

    driver.switch_to.default_content()
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-08-01
      • 2016-11-13
      • 1970-01-01
      • 2019-11-19
      • 1970-01-01
      • 1970-01-01
      • 2021-05-30
      • 1970-01-01
      相关资源
      最近更新 更多