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

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

  • 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

  • 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

  • Verified Answer

    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

  • 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