-
Book Overview & Buying
-
Table Of Contents
Selenium Testing Tools Cookbook
By :
We can implement the objects of the Page Object model using the LoadableComponent class of Selenium WebDriver. This helps in building a robust Page Object that provides a standard way to ensure that the page is loaded and that the page load issues are easy to debug.
In this recipe, we will further refactor the BmiCalcPage class created in the previous recipes and extend it as a loadable component.
This recipe uses the BmiCalcPage class created in the previous recipe.
For implementing an object of the Page Object model as the LoadableComponent class, we need to extend it from the LoadableComponent base class by performing the following steps:
Add an import statement for org.openqa.selenium.support.ui.LoadableComponent and static org.junit.Assert.* in the BmiCalcPage class. Extend the BmiCalcPage class with LoadableComponent<BmiCalcPage>. Declare a new string variable title and assign it the title of the BMI Calculator page as...
Change the font size
Change margin width
Change background colour