The window size can be maximized, set or resized
To maximize the window
driver.manage().window().maximize();
To set the window size
Dimension d = new Dimension(400,600);
driver.manage().window().setSize(d);
Alternatively,
The window size can be reset using JavaScriptExecutor
((JavascriptExecutor)driver).executeScript("window.resizeTo(1024, 768)");
Posted Date:- 2021-09-11 06:15:02
How Selenium grid hub keeps in touch with RC slave machine?
Other than the default port 4444 how you can run Selenium Server?
What is selenium RC (Remote Control)?
How can you retrive the message in an alert box ?
What if you have written your own element locator and how would you test it?
From Selenium IDE how you can execute a single line?
Using Selenium IDE is it possible to get data from a particular html table cell ?
What is the difference between Page Object Model (POM) and Page Factory?
List some scenarios which we cannot automate using Selenium WebDriver?
How to handle Ajax calls in Selenium WebDriver?
Can You Use Selenium For Rest API Testing Or Web Services Testing?
Is it possible to automate the captcha using Selenium?
How do you read test data from excels?
Explain in Selenium IDE how can you debug the tests?
Explain how you can insert a break point in Selenium IDE ?
From your test script how you can create html test report?
What is the fundamental difference between XPath and CSS selectors?
How can you prepare customized html report using TestNG in hybrid framework ?
Explain how to iterate through options in test script?
Explain how you can use recovery scenario with Selenium?
Which web driver implementation is fastest?
How will you use Selenium to upload a file ?
Using web driver how you can store a value which is text box?
How can we move to the nth-child element using the CSS selector?
Mention what are the capabilities of Selenium WebDriver or Selenium 2.0 ?
Explain how Selenium Grid works?
What is the difference between single and double slash in Xpath?
Explain what is Datadriven framework and Keyword driven?
What is a pause on an exception in Selenium IDE?
When do we use findElement() and findElements()?
How to set browser window size in Selenium?
How to upload a file in Selenium WebDriver?
How to handle STALEELEMENTREFERENCEEXCEPTION?
What are the different exceptions you have faced in Selenium WebDriver?
How to take screenshots in WebDriver?
How does Selenium handle Windows-based pop-ups?
Explain what are the JUnits annotation linked with Selenium?
How to retrieve CSS properties of an element?
What are the verification points available in Selenium?