Best Practises in Page Object Model : Naming Conventions of Web Elements & Actions on it
Hello Folks,
Recently I have started learning or exploring more on best practises in Selenium Framework and same I want to share through my blogs for yours learning as well as to know your views. In this post, we will learn Naming Convention for Web Element and actions on it.
Let’s consider a scenario:
You are very concerned about Reusability principle. You create Pages ( Page Object Model) and define all Web Element and actions on web elements so that whenever you or other automation testers develop scripts they can use Web Elements from single page instead of defining again and again. Good idea! You created page as below:
[java]
package PageObjectModel;
import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;