- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to maximize the browser in Selenium?
We can maximize the browser in Selenium with the help of method maximize().
The present active window becomes maximized with this method.
Code implementation.
Example
import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import java.util.concurrent.TimeUnit; public class BrowserMax { public static void main(String[] args) { System.setProperty("webdriver.chrome.driver", "C:\Users\ghs6kor\Desktop\Java\chromedriver.exe"); WebDriver driver = new ChromeDriver(); String url = "https://www.tutorialspoint.com/index.htm"; driver.get(url); // maximizing browser with maximize() driver.manage().window().maximize(); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); driver.findElement(By.partialLinkText("Coding")).click(); driver.close(); } }
- Related Articles
- How to maximize the browser window in Selenium WebDriver using C#?
- How to perform browser navigations in Selenium?
- How to invoke the Chrome browser in Selenium with python?
- How to invoke the Firefox browser in Selenium with python?
- How to invoke the IE browser in Selenium with python?
- How to launch Chrome Browser via Selenium?
- How to start selenium browser with proxy?
- How to maximize and minimize browsers in Selenium with python?
- How to set the size of the browser window in Selenium?
- How does selenium webdriver upload files to the browser?
- Maximize WebDriver (Selenium 2) in Python.
- How to launch Edge browser with Selenium Webdriver?
- How does selenium interact with the Web browser?
- How to close a browser session in Selenium with python?
- How to avoid the pop-up window in chrome browser with Selenium?

Advertisements