New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Highlighted
Absent Member.
Absent Member.
1563 views

how to use .inc file in silk test script?

Hi All,

 How to use .inc file in silk test basic script? I tried this format but .inc line, before indicating wrong mark

testcase test1()

use "testing.inc"

Desktop.Find("//BrowserApplication").Find("//BrowserWindow").Find("//SLApplication").TypeKeys("user1")

How to i fix this issue , i f having guide or thoughts share it .

 

Thanks,

sat6804

 

 

 

 

 

Tags (1)
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

Hi Sat,

you can either reference the frame files to be used in Options/Runtime dialog ("Use Files" and "Use Path") or reference it in a script or frame file like you did it in the above sample - however you need to do this outside a testcase or a declaration - best (for structuring purposes) is at the very top of a file.

0 Likes
Highlighted
Absent Member.
Absent Member.

Hi Wolfgang G,

How to i declare outside of the script? or path? can you please explain it.

Thanks,

Sat6804

0 Likes
Highlighted
Absent Member.
Absent Member.

1) In a script, given your example it should look like this (the same applies to frame files and declarations)

use "testing.inc"

testcase test1()

 Desktop.Find("//BrowserApplication").Find("//BrowserWindow").Find("//SLApplication").TypeKeys("user1")

2) Outside a script or frame file you can define include files that can be used project wide. See Classic help topic "Runtime Options Dialog Box" Use path/Usefiles.

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.