How to convert String to By type.
Following is my scenario: Keep object identification in Properties file in below manner
username=By.id(\"username\")
pa
I think you are trying to implement page object model using properties file. What I would suggest here to use xml file instead of java properties file. for example sample xml for page elements would look like below.
username
password
Now you can write methods retrieve nodes from the xml file and node attribute as id,xpath etc... further write methods to find elements using xml node value and attribute. I have used same method in my project as it works great for me.