- 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 open a browser window in full screen using Selenium WebDriver with C#?
We can open a browser window in full screen using Selenium webdriver in C# by using the method Maximize. This method has to be applied on the webdriver object.
Syntax
driver.Manage().Window.Maximize();
Example
using NUnit.Framework; using OpenQA.Selenium; using OpenQA.Selenium.Firefox; using System; namespace NUnitTestProject1{ public class Tests{ String url = "https://www.google.com/"; IWebDriver driver; [SetUp] public void Setup(){ //object of FirefoxDriver driver = new FirefoxDriver(); } [Test] public void Test1(){ //URL launch driver.Navigate().GoToUrl(url); //browser maximize driver.Manage().Window.Maximize(); Console.WriteLine("Browser Maximized"); } [TearDown] public void closeBrowser(){ driver.Quit(); } } }
Output
- Related Articles
- How to open browser window in incognito/private mode using python selenium webdriver?
- How to open a new window on a browser using Selenium WebDriver for python?
- How to close child browser window in Selenium WebDriver using Java?
- How to maximize the browser window in Selenium WebDriver using C#?
- How to connect to an already open browser using Selenium Webdriver?
- How to open a link in new tab of chrome browser using Selenium WebDriver?
- How to Resize Browser Window in WebDriver?
- How to open a new tab using Selenium WebDriver?
- How to launch Edge browser with Selenium Webdriver?
- Capturing browser logs with Selenium WebDriver using Java.
- How to open a link in new tab using Selenium WebDriver?
- How can I close a specific window using Selenium WebDriver with Java?
- How to Handle CSS in Browser Full-Screen Mode?
- How to simulate Print screen button using selenium webdriver in Java?
- How to hide Firefox window (Selenium WebDriver)?

Advertisements