Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Why does using the pipe symbol "|" in a SilkTest tag return error "Object was not found"?

Why does using the pipe symbol "|" in a SilkTest tag return error "Object was not found"?

The pipe symbol "|" does not check the 2nd segment of a multiple tag which returns Error "Object was not found".

How the "|" pipe symbol in a tag is supposed to work:

SilkTest attempts to resolve each segment of a multiple tag, from left to right, until it finds a match that is unique. For example:

Frame file:

[-] window BrowserChild LinkDoesNotWorks
[ ] tag "Case 41235"
[ ] parent Browser
[-] HtmlLink ClickMe
[ ] //This is where the problem is and if you change Column 1|Column 2 to Column 2|Column 1 it will work fine
[ ] //as the link is in Column 2
[-] multitag "[HtmlTable]#1/[HtmlColumn]Column 1|Column 2/Click Me"
[ ] "#1"
[ ] "Click Me"
[ ] "$file:???C:?WINNT?Profiles?grehault?Desktop?41235?success.htm"
[ ]
[+] HtmlTable HtmlTable1
...
So the declaration below should allow you to look for ClickMe in Column 1 and if it is not there it should look in Column2 where the control is and find the control, but when running the testcase below it give an error "object not found"

Testcase: ...
[ ] LinkDoesNotWorks.ClickMe.Click()
...

This can be resolved by modifying the tag in the frame file as follows:

[-] HtmlLink ClickMe
[-] multitag "[HtmlTable]#1/~/[HtmlColumn]Column 1|Column 2/Click Me"
[ ] "#1"
[ ] "Click Me"
[ ] "$file:???C:?WINNT?Profiles?grehault?Desktop?41235?success.htm"

The tag construct (~) when placed ahead of a gui-object will force tag resolution to examine that object and the one following it.

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:32
Updated by:
 
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.