15. 'open( )' - predefined method to open the specified URL

'open( )' predefined method of 'Selenium' Class is used to open the specified URL.

Example:  object1.open("http://www.selenium143.blogspot.com");

Lets implement This:

1. Start the Selenium RC Driver as explained in our previous post # 14
2. Type 'object1' object of 'Selenium' Class and press dot '.' on your keyboard as shown below:


3. Type 'op' text after the dot to filter the displayed selenium predefined methods and select the 'open( )' method option as shown below:


4. Ensure that the 'open( )' method got added as shown below:

5. Replace the argument with your URL say "http://www.selenium143.blogspot.com" as shown below:


6. Save and Run the Test using JUnit and observe that the URL specified in the above step got opened by the browser as shown below:


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

Watch the Video on how the 'open( )' commands opens the specified URL:

Click here to watch the Video.

Download this Project:

Click here to download the Project explained in this post and import into Eclipse IDE on your machine.

Please comment below to feedback or ask questions.

windowMaximize( ) -  predefined method to maximize the Browser window will be explained in the next post.



No comments:

Post a Comment

Followers

Labels