Monday, October 19, 2009

Part 4: How Does Selenium work

1.Selenium is developed by using JavaScript and implemented with browser technology.
2.Tests run directly in the browser.
3.Selenium deploys its own BrowserBot with our application for this selenium engine uses JavaScript and Iframes.
4.Since Selenium uses Javascript it works with an Java-Script enabled browser.

The above statements are the technical description of Selenium as A Tool but as a user you ma not need to dig in to how it works or how it developed and all. All you want is how it works for you.
1. Selenium loads our application b the specified url, the command use for this is selenium.open(url)
2.Selenium identifying the elements in the web page under test b using the element locators
3.Selenium does Actions on the web page under test by using the locators and its action methods (type, click, select, check..etc)
4.After the output generated or the resultant page loads (selenium waits for the pageload)Selenium does verifications using assert or verify methods.
5.Accessors (getter methods): After generating the out put we can get and store it.
6.We can refine our tests using other methods like storing values, waiting for a pageload etc. Doing some operations on the output values etc.

Make use of selenium's auto help from selenium IDE (type the method/Acton name’s first character and refer the description comes along with the method)or use the appropriate drivers documentation to learn more about the methods in selenium (If you are using selenium RC and an of the drivers you will get the DOC for the appropriate drivers.)

1 comment: