Monday, 20 March 2017

Selenium WebDriver - Maximize window (浏览器窗口最大化)

Selenium WebDriver with python - Maximize window

FireFox : 

         self.driver = webdriver.Firefox()
      self.driver.maximize_window()

Chrome : 
   url = "C:\\Programs\\Python36\\BrowersDriver\\chromedriver.exe"
      options = webdriver.ChromeOptions()
      options.add_argument("--start-maximized")
      self.driver = webdriver.Chrome(url,chrome_options=options)

No comments:

Post a Comment

how-to-recursively-create-subfolder-in-each-folder-of-a-directory-in-cmd

test.cmd: @echo off setlocal for /f "usebackq tokens=*" %%a in (`dir /b /a:d`) do ( rem enter the directory pushd %%a echo...