The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> IBM/Rational Robot

Pages: 1
jerseyzuks
Newbie


Reged: 11/22/11
Posts: 2
Verification Point to verify a file exists
      #691796 - 11/22/11 09:32 AM

I need to verify that a file was successfully created in a users My Documents folder.

The problem is that different user IDs will be used for testing, all with different levels of access rights, so I was using the %USERPROFILE% variable.

I created a .txt file called test.text in the users MyDocuments folder, but when I run the script it says "Unable to find specified file"

I have tried the following...

Result = FileVP (Exists, "Name=%USERPROFILE%\My Documents\test.txt", "VP=File Existence;Wait=2,10")

Result = FileVP (Exists, "Name="%USERPROFILE%\My Documents\test.txt"", "VP=File Existence;Wait=2,10")

Result = FileVP (Exists, "Name={%}USERPROFILE{%}\My Documents\test.txt", "VP=File Existence;Wait=2,10")

Any suggestions?


Post Extras: Print Post   Remind Me!   Notify Moderator  
SteveO44
Active Member


Reged: 07/08/04
Posts: 1157
Loc: St. Louis, MO, USA
Re: Verification Point to verify a file exists [Re: jerseyzuks]
      #692235 - 11/29/11 08:57 AM

Have you tried to output the path in a message to verify you're trying to hit the correct path in your script?

--------------------
1. LR/PC 11
2. HTTP
3. No
4. Concurrent
5. n/a
6. New
7. 40k Web, 2k SOA, 1k DB
8. Yes
9. Server 2003


Post Extras: Print Post   Remind Me!   Notify Moderator  
Dan McNamee
Junior Member


Reged: 05/01/02
Posts: 11
Loc: Denver, CO, USA
Re: Verification Point to verify a file exists [Re: SteveO44]
      #717251 - 10/01/12 12:34 PM

Been a while since I've used robot. The USERPROFILE is a variable so must be outside of quotes in the string and you must build you string around it by appending, so try:

Result = FileVP (Exists, "Name=" + %USERPROFILE% + "\My Documents\test.txt", "VP=File Existence;Wait=2,10")


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 6 anonymous users are browsing this forum.

Moderator:  AJ, RSBarber 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 3245

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5