161. Create Properties text file





As already discussed in our earlier post, handling Parameterization with testng configuration XML file is preferable only when there are less number of parameters to be used in the Selenium Automation code. But if we want to use more number of parameters in our Selenium Automation code, one of the methods of doing it is to create Properties file with list of parameters and retrieve the listed parameters from the file and use them in our Selenium Automation code.

Follow the below steps to create a Properties text file:

1. Create a new Package 'configparameters' as shown below:


2. Right click on the package 'cofigparameters' and select  New -> File option as shown below:



3. Ensure that a 'New File' dialog is displayed, enter Config.properties into the 'File Name' field and click on 'Finish' button as shown below:



4. Ensure that Config.properties text file got created and opened as shown below:



5.


2 comments:

  1. Hi Arun,

    This Selenium tutorial is awesome. This morning I started reading Selenium 1 tutorial and it is really very thorough. Now, I am at the chapter aage.161 - Create properties text file and realize that I think this is not complete and the last chapter for the Selenium 1. Are you planning to upload the remaining Selenium 1 and Selenium 2 chapter soon? Could you please upload them soon?

    ReplyDelete
  2. Very helpful tutorials!!! When can we have remaining videos?

    ReplyDelete

Followers

Labels