Can we use Properties file (Object Repository) with the Page Object Model design pattern.?

405 views
Skip to first unread message

Pari B

unread,
Oct 3, 2016, 6:07:01 AM10/3/16
to Selenium Users
Hi,

I am very new to Selenium and i came across a doubt that while i am using Page Object Model design pattern for my project  ,is it valid to use Properties file as object repository .? 

Or the Page Object Model pattern itself does the work of "Properties file "..?? 


Please help me ..!!!



⇜Krishnan Mahadevan⇝

unread,
Oct 3, 2016, 6:22:40 AM10/3/16
to Selenium Users
Parimala,

First things first. The Page Object Model pattern doesn't mandate that you have to have your locators passed in via any specific mechanism. Page Object Model merely states that you would need to visualise your actual page as a Java object and use the Java Object to interact with your page via mechanisms that the java object provides for the interaction.

The most commonly used ones by everyone which relies on PageFactory relies on annotations to pass in the locators for every element.

Sometime back I was doing some research around Page Factory and I stumbled into a mechanism using which you can decouple page factory [ which initializes page objects via reflection and helps find web elements ] and an external data source which would house the locators.



Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/f2f104b6-21f7-46f0-9a46-0a88190614c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages