I am supposed to upload images to the application. I wanted to create a folder which contains images. And the path of images would be passed in setText method as current working directory. So that other testers can clone the code and execute testcases without making any changes.
You can create a new folder simply using Windows File Explorer, Total Commander or other tool.
Just navigate to your project’s folder and create a new one inside. You’ll get its path using my code above. It is relative path (not dependent on local machine), so it would work also when you move your project to other machine.
How can I create a folder ‘images’? I’ve created in workspace but it’s not showing up in the project explorer.
I also created a folder in Datafiles and added images to it from the workspace but still it’s not showing up in project explorer
Hello, create folder images in your project folder and add this code:
def imgDir = RunConfiguration.getProjectDir() + "\images"
imgDir contains absolute path to images folder (e.g. C:\Katalon\MyProject\images)