【问题标题】:In Python what is the code for F12 Keyboard press在 Python 中,F12 键盘按下的代码是什么
【发布时间】:2020-03-12 10:51:28
【问题描述】:

平台:Python+selenium+pycharm

要求 - 桌面 - 打开 Chrome 浏览器 - 按 F12 键,然后按 Ctrl+Shift+M

【问题讨论】:

    标签: python selenium automation controller keyboard


    【解决方案1】:

    安装sudo pip3 install keyboard(在python3中) 您可以使用:

    import keyboard
    
    keyboard.press_and_release('F12, ctrl+shift+m')
    

    【讨论】:

    • ctrl+shift+M - 这没有被执行
    • @TestingJustdial 立即尝试,使用较低的“m”。我编辑了。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-31
    • 2012-06-05
    相关资源
    最近更新 更多