Can we use page factory technique using property file

I am thinking that is there any way to use page factory technique  &  load object from property file

Train Asked on September 9, 2015 in Selenium WebDriver.
Add Comment
  • 4 Answer(s)

    It depends on  what you want to load from property file

    Reviewer Answered on September 9, 2015.

    I want to load object’s details like identifier & value .

    for eg. the structure of property file will be as below

    LOGIN_USERNAME=Xpath://input[@data-bind=’value: userName’]

    So, in above example  ‘LOGIN_USERNAME’ is object name , ‘Xpath ‘ is indentifier & “//input[@data-bind=’value: userName’]” is  that object’s xpath value. Hope you understand.

    on September 9, 2015.
    Add Comment

    Yes
    we can use property file to import the data in test files.

    Train Answered on September 9, 2015.
    Add Comment

    Just for me use PageFactory is enough.
    It’s more understood, reusable.
    But I also use prop files
    to load attributes for my business objects

    Reviewer Answered on September 9, 2015.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.