- May 27, 2024
- Niharika Gonugondla
- 0
File Operations in Tosca
In Tosca we can copy, compare, delete, append, rename, create files. To do all these operations go to module section- TBOX Automation – File operations.
TBOX Image Compare
           TBOX Image compare will compare two images. Input the path of first image and second image that you want to compare in the value field and action mode as input. If the two images are same, then the verification passes and if images are different, the verification fails.
TBOX File Existence
             TBOX File Existence will verify whether the file exists or not, in the directory you specify. Input the path of the file in the value field of directory with action mode input and input the name of the file that you want to verify whether it exists or not in the value field and action mode as verify.
TBOX Delete File
               TBOX Delete File will delete the file in the directory you specify. Input the path of the file you want to delete in the value field of directory and action mode as input and input the file name in the value field of file and action mode as input.
TBOX File Compare
                 TBOX File Compare will compare the two files. Input the path of first and second file path in the value field and action mode as input. If the data in the file matches then the result passes and if the data differs the result fails.
TBOX File Copy
               TBOX File Copy will copy the file from one location to the path you specify. Input the source file path in the value field and action mode as input and the path of the directory you want your file to move in the value field and action mode as input and the file name in the target and action mode as input.
TBOX Read/Create File
                  TBOX Read/Create file will create the file and enter the data into the file. Input the path of directory in the value field and action mode as input and the name of the file you want to create in the value field and action mode as input and the text in the value field and action mode as input.
TBOX Append File
                TBOX Append file will add text to the existing text in the file. Input the path of the file in the value field and action mode as input and the text you want to append to file in the value field and action mode as input and mark True in the value field if you want the text to be started in the newline and false if you don’t want and action mode as input and data type as boolean.
TBOX Move/Rename file
                TBOX Move/Rename file will move the file and rename the file from one location to other. Input the path of the file you want to move in the existing path and action mode as input and the path you want your file to be moved and name of the file in the value field and action mode as input.