V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
smallgoogle
V2EX  ›  Python

selenium firefox 最大化窗口问题

  •  
  •   smallgoogle · 2018-12-22 06:09:16 +08:00 · 2884 次点击
    这是一个创建于 1923 天前的主题,其中的信息可能已经有所发展或是发生改变。
    使用 selenium firefox,最大化窗口,好像只有 maximize_window()

    可是我要的最大化是 F11 的那个效果,就是连浏览器的边框都看不到的那种。。

    话说 selenium 有这方面的函数 API 么。?各位爸爸们。
    12 条回复    2019-04-14 18:14:02 +08:00
    daigouspy
        1
    daigouspy  
       2018-12-22 07:09:56 +08:00 via Android
    那叫全屏吧?
    smallgoogle
        2
    smallgoogle  
    OP
       2018-12-22 08:59:24 +08:00
    @daigouspy 就是要全屏。可是怎么都百度不到。
    daigouspy
        4
    daigouspy  
       2018-12-22 09:06:14 +08:00 via Android
    @smallgoogle 能不能模拟按键?发一个 f11 过去试试。
    opengps
        5
    opengps  
       2018-12-22 10:50:32 +08:00 via Android
    3 楼,模拟按键
    iyaozhen
        6
    iyaozhen  
       2018-12-22 11:45:31 +08:00 via Android
    没必要吧,你就说模拟用户场景,用户一般不会全屏
    smallgoogle
        7
    smallgoogle  
    OP
       2018-12-22 16:53:21 +08:00
    @daigouspy 试过模拟按键。不生效
    smallgoogle
        8
    smallgoogle  
    OP
       2018-12-22 16:54:37 +08:00
    @Les1ie C#和 python 是不一样的。
    smallgoogle
        9
    smallgoogle  
    OP
       2018-12-22 16:54:49 +08:00
    @iyaozhen 就是有这个需求才问的 = =
    claymore94
        10
    claymore94  
       2018-12-22 22:06:37 +08:00
    找个 F11 的键位? 不太清楚,只知道可以向 selenium 发送回车键
    smallgoogle
        11
    smallgoogle  
    OP
       2018-12-22 22:57:21 +08:00
    @claymore94 哎。firefox 各种不行。
    peachplum
        12
    peachplum  
       2019-04-14 18:14:02 +08:00
    @smallgoogle 额 现在回复是不是稍微有点晚,
    driver.fullscreen_window()
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5305 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 09:25 · PVG 17:25 · LAX 02:25 · JFK 05:25
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.