How you build object repository in your project?



How you build object repository in your project?..

Answer / Satendra

In my Selenium project, I've built the Object Repository using a combination of Page Factory and Abstract Classes. Each page (like LoginPage, HomePage, etc.) has its own abstract class that contains all the web elements for that page. The concrete classes inherit from these abstract classes, which allows us to reuse the same web elements across multiple pages.nnHere's an example of an abstract class:nn```javanpublic abstract class BasePage {n @FindBy(id = "login_button")n public WebElement loginButton;n}n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Selenium Interview Questions

Write the code for reading and writing to excel through selenium?

1 Answers  


Tell me what is a hub in selenium grid?

1 Answers  


List out different types of locators?

1 Answers  


What are the advantage and features of selenium ide?

1 Answers  


What happens if I run this command. Driver.get(“www.softwaretestingmaterial.com”) ;

1 Answers  


What is implicit wait in selenium webdriver?

1 Answers  


What is the main difference between the close() and quit() methods?

1 Answers  


How do I launch the browser using webdriver?

1 Answers  


How many types of waits in selenium?

1 Answers  


what are the Dynamic elements in web Application?

2 Answers   Eton, HCL,


Explain what is group test in testng?

1 Answers  


What is the purpose of creating a reference variable- 'driver' of type webdriver instead of directly creating a firefoxdriver object or any other driver's reference in the statement webdriver driver = new firefoxdriver();?

1 Answers  


Categories