Highlighted
Absent Member.. Absent Member..
Absent Member..
491 views

FSO object that is global and can be accessed from local and external actions

Jump to solution

 Hi.

 

Here's what I am struggling with.  I would like to create an fso object at the start of the test run.  Then either reference it directly, or pass it as a parameter, to the actions used by the test (both local and external actions).  I have tried many things, and researched quite a bit, but have been unable to do this successfully.  Any suggestions out there?

 

Thanks,
Bret.

Tags (2)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.

Hi Bret,

 

One option to achieve this, is to create the FSO object in a function library and associate it to the test. The library would for example contain:

 

Set fso = CreateObject("Scripting.FileSystemObject")

 

As the code in function libraries is loaded into memory at the beginning of the test run, you would be able to access the fso object created in the library from the test actions.

 

Kind Regards,

Francisca

View solution in original post

3 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

More research is finding that an fso is a 'main' object.  Does that mean that it can't be accessed by subs in a function library associated with that test?

0 Likes
Highlighted
Absent Member.
Absent Member.

Hi Bret,

 

One option to achieve this, is to create the FSO object in a function library and associate it to the test. The library would for example contain:

 

Set fso = CreateObject("Scripting.FileSystemObject")

 

As the code in function libraries is loaded into memory at the beginning of the test run, you would be able to access the fso object created in the library from the test actions.

 

Kind Regards,

Francisca

View solution in original post

Highlighted
Absent Member.. Absent Member..
Absent Member..

Thanks Fransisca,

 

Perfect.  Glad I found out about this forum.  Hope to get help and also be of help!  Automated testing for 10+ years, but most of it was 6+ years in the past using SQA/Rational robot, before getting screwed by having to swith over to rational functional tester.  UFT seems to be as good as is claimed, and hopefully I can add some help going forward.

 

Thanks again!

 

Best,

Bret

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.