Category: Selenium Topics

This category contains topics of Selenium.

FindBys Annotation In Page Factory In Selenium WebDriver

Hello Folks, In this post, we will learn about another annotation in Page Factory called FindBys. Suppose, you need to find count of web elements who satisfy all below criteria: whose id is “ABC” whose name is “DEF”. whose xpath is “XYZ”. It will be difficult to write normally but @FindBys annotation makes it very simple for […]

FindAll Annotation In Page Factory In Selenium WebDriver

Hello Folks, In this post, we will learn about another annotation in Page Factory called FindAll. Suppose, you need to locate below web elements and find out counts: All web elements whose class name is “ABC”. All web elements whose id is “DEF”. All web elements whose linkText is “Sometext”. Generally you will write as […]

Why It Is Not Possible To Read Locators From External Sources In Page Factory Of Selenium WebDriver

Hello Folks, Many automation tester wants to read locators from external sources like database, properties file or excel sheets. Reading locators from external sources and using it in your program is very easy if we don’t use Page Factory. It becomes difficult because of @FindBy annotation. What is annotation in Java? Annotations in Java are […]

Creating Object Repository In Selenium WebDriver Using Properties File As An External Source

Hello Folks, We have seen Page Object Model in previous posts and you must be noticing that we are writing locators within code. It has its own disadvantages as below: For any modification in locator, you must need to touch the code. Difficult for manual tester or beginner in automation testing to find out correct […]

Creating Object Repository In Selenium WebDriver Without Using Any External Data Source

Hello Folks, We have seen Page Object Model In Selenium. In this post, I will explain a way ( Mostly what I have seen in many selenium frameworks) to design a proper page object model. It is also asked in interview that if  you have implemented encapsulation and abstraction in selenium framework. This post might […]

How To Establish Relationship Between Pages In Page Object Model In Selenium WebDriver

Hello Folks, In interview it is frequently asked question that “How To Establish Relationship Between Pages In Page Object Model In Selenium WebDriver”. It is very simple question but generally interviewee confuses. I will explain in a simple way in this post. What is establishing relations between pages? Suppose you have two pages, Page A […]

Difference Between Page Object Model And PageFactory In Selenium WebDriver

Hello Folks, In this post, we will see what is difference between Page Object Model and Page Factory in Selenium WebDriver. This is also a very frequently asked interview question. Before we proceed. first go through to below posts: Introduction of Page Object Model Plain Page Object Model Page Factory After reading above posts, you […]

Is It Possible To Use Page Factory Without FindBy In Selenium WebDriver?

Hello Folks, We are learning about Page Object Model in selenium in previous posts. This is another part of that. Selenium webdriver has inbuilt page object model which is called Page Factory where we write web elements(Page Objects) with it locators using annotation @FindBy. Does FindBy annotation mandatory for Page Factory? Answer is NO. We […]

How Page Factory In Selenium WebDriver Performs Lazy Initialization

Hello Folks, We have seen some posts on Page Object Model and Page Factory in Selenium in previous posts. We will see some interesting facts about Page Factory in this post. Do you know that Page Factor perform lazy initialization? We will see how. When we use “initElements” method of PageFactory, all page objects of […]

Please wait...

Subscribe to new posts to become automation expert

Want to be notified when my new post is published? Get my posts in your inbox.