【问题标题】:Python Selenium is not opening the linkPython Selenium 没有打开链接
【发布时间】:2023-03-24 03:18:01
【问题描述】:

Python Selenium 正在打开一个选项卡,但不是给定图像中显示的链接

问题是当我在 Linux 中运行它时,它没有打开如图所示的链接

终端:-here you go

感谢您的宝贵时间

【问题讨论】:

    标签: python-3.x selenium selenium-webdriver bots geckodriver


    【解决方案1】:

    请您尝试以下解决方案:

       from selenium import webdriver
        while True:
            driver =  webdriver.Firefox(executable_path="/usr/local/bin/geckodriver")
            driver.get("http://google.com/")
            driver.quit()
    

    【讨论】:

    • 这是 Linux 不是 Windows 没有 exe 先生
    • 将您的 geckodriver 移动到 /usr/local/bin/ 文件夹,并使用 chmod 命令对 geckodriver 可执行文件授予可执行权限
    • 你不需要删除它
    • 我今天试试
    • 你遇到什么问题
    猜你喜欢
    • 2022-11-23
    • 2020-11-27
    • 2014-01-26
    • 1970-01-01
    • 1970-01-01
    • 2019-10-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多