Wondering if someone can tell me how I can get the Katalon Studio project path at runtime.
looking for something similar to the below:
String dirName = RunConfiguration.getProjectDir()
1 Like
Thank you Sir.
1 Like
The option “String dirName = RunConfiguration.getProjectDir()” didn’t work for me.
I used:
String dirName = System.getProperty(“user.dir”)
Perhaps you forgot to write
import com.kms.katalon.core.configuration.RunConfiguration
1 Like
System.getProperty("user.dir")
is OK when you work on Katalon Studio GUI, but is not when you work on Katalon Runtime Engine.
In KRE, your current directory (user.dir) will not necessarily be equal to the project directory.
3 Likes