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.
2062 views

How to Work Object Repository using silk test Open Agent Tool with silk4test script?

Jump to solution

Hi All,

How to Use and Store Object Repository in Silk Test Open Agent with Silk4test Script ? If having any guide , can you please share it ...

 

Thanks,

Sat6804

Tags (1)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Admiral
Admiral

Hi Sat,

The inc file is Silk Test Classic's equivalent of QTP's Object Repository. Although an inc file is more code-like it serves the same purpose as QPT's Object Resposity. The inc file is the place to store locators for objects and reuse them in your test scripts.

Example:

if you have three test scripts that click on a button with the text "Cancel" and for some reason you need to change the the text to "Exit", just update the locator for this button in your inc file. Then all of your three test scripts will use the new text when finding the button during playback.

The test would look like this:

MyWindow.MyButton.Click()

and your updated inc file would look like this:

[-] window MainWin MyWindow
	[ ] locator "/MainWin"
	[-] MyButton PushButton
		[ ] locator "//PushButton[@caption='Exit']"


Please let me know if that answers your question.
Regards, Michael

View solution in original post

0 Likes
4 Replies
Highlighted
Admiral
Admiral

Hi,

I would try to record a script and then inspect the generated inc file (contains the objects) and the .t file (contains the actions that use those objects). Do you have any specific follow-up questions?

Michael

0 Likes
Absent Member.
Absent Member.

Hi Michael,

Thanks for your Reply.

How to use Object Repository concepts in ST like QTP?(storing all the attribute as object repository after that use anywhere).Changing all the attribute value as same value..

This for our requriement:

Storing all the object as single file(excel or .inc) . After that we can fetch and use the object in silk test scripts.

If having any guide for this please share it.

Thanks,

Sat6804

0 Likes
Highlighted
Admiral
Admiral

Hi Sat,

The inc file is Silk Test Classic's equivalent of QTP's Object Repository. Although an inc file is more code-like it serves the same purpose as QPT's Object Resposity. The inc file is the place to store locators for objects and reuse them in your test scripts.

Example:

if you have three test scripts that click on a button with the text "Cancel" and for some reason you need to change the the text to "Exit", just update the locator for this button in your inc file. Then all of your three test scripts will use the new text when finding the button during playback.

The test would look like this:

MyWindow.MyButton.Click()

and your updated inc file would look like this:

[-] window MainWin MyWindow
	[ ] locator "/MainWin"
	[-] MyButton PushButton
		[ ] locator "//PushButton[@caption='Exit']"


Please let me know if that answers your question.
Regards, Michael

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

Hi Michael,

Thanks for your valuable Answers.

We have two more questions.

1) The first one is any possible option is their using Object repository concepts in Open Agen script?

2) Created .inc files and used the below format, but using silk test scirpt(.t) files it shows wrong icon in use "test.inc" line. how to reslove this , if you having any idea for this, can you pls share it..

testcase test1()

use "test.inc"

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

Thanks,

Sat6804

Tags (1)
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.