This will give you an introduction to “Page Object Model” and its implementation in Selenium using java. Before starting with Page Object Model let’s first know what are design patterns. Design patterns. A Design pattern is a generic solution to a common software design/architecture problem. Implementation of these design patterns leads to inclusion of best practices and best solution, evolved over the time by others while working with similar problems. Page Object Model in Selenium A Page Object Model is a design pattern that can be implemented using selenium webdriver. It essentially models the pages/screen of the application as objects called Page Objects, all the functions that can be performed in the specific page are encapsulated in the page object of that screen. In this way any change made in the UI will only affect that screens page object class thus abstracting the changes from the test classes. Advantages of using Page Object Model Increases code reusability – code to work with events of a page is written only once and used in different test cases Improves code maintainability – any UI change leads to updating the code in page object classes only leaving the test classes unaffected Continue reading
By using this Password Encryptor, we can secure the password.Its so simple to Encrypt.
This post helps you,How to extract Cookies in a page.We can Add/Delete Cookies by using few methods.
There always a problem to find the broken links/Images present in the application.This post helps you to find the Broken links.And it captures all the valid links and invalid links in an Excel Sheet
Here i am using java.net.HttpURLConnection.This can be done in many ways too,This code can be used for any project though.
This post helps you to Read Data from Notepad.This is so simple.By using two classes FileReader,BufferedReader we can read data.
Sometimes we have to print some data into Notepad according to our need.So this post helps you to write data into Notepad.
There’s always a difficulty to handle Alerts in a Page.In that case we’ve to create a Method to handle alert and use Try and catch block.So that whenever an alert appears,it will handle.
Generally We don’t have to Test entire database of our application.To my knowledge, We use Selenium to test the Database whether data given in the front end(UI) is as same as the data present in the Database(Back End).
Note: We don’t do negative testing in database.
Here i am using MySql to test the database.
You need to Download Java.sql jar and configure database in your system. I’ll explain database configuration in Upcoming posts.
There will be a need to write data into Excel.So This post tells you How to Write data into Excel.
Download Jxl jar/Apache Poi. Here I am Using Jxl jar.