13. Selenium Class and its Predefined Methods



'Selenium' Class is a predefined class containing a lot of predefined methods to be used in Selenium RC Automation.

In order to Access the predefined methods of 'Selenium' Class, we've to create an object for the Selenium Class and use the created objects to retrieve the predefined methods of Selenium Class.

We usually follow the below steps while writing Selenium RC Automation Code:

1. Defining a selenium object as shown below:





2. Assign reference to the created object and call the 'DefaultSelenium' Constructor with parameters as shown below:





3. Retrieve the predefined methods of 'Selenium' class using the above defined and reference assigned object as shown below:





From the above steps its very clear that, we've retrieved the predefined method 'start( )' of 'Selenium' Class using the object defined for 'Selenium' Class i.e. 'object1' object.

But going forward, there are many predefined methods of 'Selenium' Class like 'start( )' method. Each predefined method will perform a different kind of task for us.

Few Predefined Methods of Selenium Class:

start( ) -> Starts the Selenium Driver
open( ) -> Opens the specified URL is the browser
click( ) -> Clicks the button or link in the browser
close( ) -> Closes the browser window
stop( ) -> Stops the Selenium Driver.
And many more.

In the next posts, I'm going to explain some predefined methods that you may require often while writing Selenium RC Automation code.To start with I will explain 'start( )' predefined method in the next post.

Please comment below to feedback or ask questions.

'start( )' selenium method will be explained in the next post.


No comments:

Post a Comment

Followers

Labels