16. windowMaximize( ) - predefined method to maximize the test browser window



'windowMaximize( )' predefined method of 'Selenium' Class is used to maximize the test browser window in which the specified URL has been opened earlier.

Example:  object1.windowMaximize( );

Lets Implement This:

1. Start the Selenium RC Driver as explained in our previous Post#14
2. Open the URL using the Selenium RC command as explained in our previous Post#15
3. Type 'object1' object of 'Selenium' Class and press dot '.' key on your keyboard as shown below:

4. Type 'win' text followed by dot as shown below to filter the displayed 'Selenium' predefined methods and select the 'windowMaximize( )' method:


5. Ensure that the selected method got added to the Code and save the project as shown below:


6. Run the Code using JUnit and observe that Test Browser window got maximized as shown below:


This is how 'windowMaximize( )' predefined method of 'Selenium' Class works.

Watch the Video on how the 'windowMaximize( )' command maximizes the Test Browser Window:

Click here to watch the Video



Please comment below to feedback or ask questions.

Using Thread.sleep(milliseconds); to make the JUnit stop executing the Selenium RC Code for specified milliseconds will be explained in the next post.


No comments:

Post a Comment

Followers

Labels