I am using rcptt to automate my application. One test case is,
- add a file
- then my app will read info from that file and proceed further if
i click on next button.
To do this, i am using the below code
set-dialog-result File [concat [get-workspace-location | str] "/proj/folder/sample-file.txt"]
get-editor "editor" | get-button Add | click
get-button "Save (M1+S)" | click
It can add the file but it can not read info from the file when i proceed further.
It shows error
could not be opened for reading
But the file is there as i checked that manually.
what is wrong i am doing?
Thanks
If I am not wrong you are trying to add a new file, save it and then open the saved file?
You can use read-file command to read a file.
example: read-file -uri "C:/Users/kaneezr/Desktop/WorkspaceRcptt/XATest/dataFile"
Here I am able to read a file by using the read-file option and providing a uri for it.
You can refer to the following as well: https://www.eclipse.org/rcptt/blog/2015/08/12/file-and-clipboard-content.html
I am not sure if it will help but you can try and see.