How do I resize the window in Chrome and Firefox when testing with Selenium?

前端 未结 2 1815
小鲜肉
小鲜肉 2021-01-12 14:41

We created extensions for Chrome, Firefox and Safari and we want to test our extensions with Selenium. We have an Ubuntu server and I installed Firefox and Chrome in it (wit

2条回答
  •  梦毁少年i
    2021-01-12 15:17

    driver.set_window_size(width, height) 
    

    If you don't know the width and height use the How Big Is My Browser website.

提交回复
热议问题