Forum Discussion

asseldonk01's avatar
asseldonk01
Contributor
11 years ago

Relative path tot check file existance

I have played with soms of the new tests regarding checking the existance of a file. I tried a relative location of a file but i could not get it working. I changed the project property to ProjectDir. Is a relative location supported for these new tests in ready API?



1 Reply

  • GiscardN's avatar
    GiscardN
    Frequent Contributor
    Hi,



    The project property "Resource Root" with value ${projectDir} will make references to the project's directory still for resources that you use in your project.

    When doing your check, please define the project path as follows:

    def projectDir = groovyUtils.projectPath



    Thanks,



    Giscard

    SmartBear Support