I have a global.properties file and have to define the file path inside this properties file.
SheetPath=C:\\Users\\test\\Automation-Scripts\\DataTable.xlsx
This is an absolute path but require a way to define a relative path that can be consumed while calling.
Properties file:
Load the properties file:
Read the properties file and get absolute path:
Sample output: