Skip to content

for_new_tab 获取不到返回值 #644

@ChaXxl

Description

@ChaXxl

如下面代码所示,for_new_tab 函数出错了

from DrissionPage import Chromium

bro = Chromium()
tab = bro.latest_tab

tab.get('https://github.com/g1879/DrissionPage')

ele_issues = tab.ele('#issues-tab')

try:
    issue_tab = ele_issues.click.for_new_tab()
except Exception as e:
    print(e)

运行结果:

D:\Code\Python\weikai\.venv\Scripts\python.exe C:\Users\73446\AppData\Roaming\JetBrains\PyCharm2025.2\scratches\scratch.py 

没有等到新标签页。
版本: 4.1.1.2

Process finished with exit code 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions