I need to save my XML file in the same place where my Java file is present, and call and use the XML when running the java file. Is there a way this can be achieved?
Below is my code:
File fXmlFile = new File("C:\testing eclipsefolder/workspace/java1`/bin/diliya123/v1.xml");
Here I need to specify the path to my XML file. But I do not want to give this path, it should be such that when I transfer my jar file to others, it should not change its path, it should be constant every time.
When I try to run the same script using the code above, I get the following type of error:
[TestNG] Running: C:\Documents and Settings\saalam\Local Settings\Temp\testng-eclipse-1407458964\testng-customsuite.xml
Guys, please suggest me how this is possible.
source share