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

How can I interact with controls which are recognised as pieces of data within a List control?

How can I interact with controls which are recognised as pieces of data within a List control?

Controls which are recognised as pieces of data within a List control cannot be interacted with explicitly within SilkTest. It requires the user to use low level events in order to generate the required interaction with the controls from SilkTest.

For Example.
A hidden menu is only displayed when you click on a control recognised as a HtmlList. The menu items in the hidden menu are recognised as pieces of data within this HtmlList and are not open to SilkTests general functionality such as the Click() function etc. How can SilkTest interact with this hidden menu?

From the problem above we can determine the steps required in order to allow SilkTest interact with the hidden menu:

Steps:
1. Click the HtmlList to expose the hidden menu
2. As the menu items are pieces of data within the confines of the HtmlList we must continue our interaction with the HtmlList. This involves clicking the HtmlList with an X,Y offset in order to click the menu item we require.

4Test code

[-] testcase hiddenMenu () appstate DefaultBaseState
    [ ] BrowserPage.HtmlList.Click() //expose the hidden menu
    [ ] Agent.SetOption(OPT_VERIFY_COORD,FALSE) //turn off coordinate verification if you are clicking outside the confines of the HtmlList control
    [ ] BrowserPage.HtmlList.Click(1,40,35) //Click the HtmlList with an X,Y offset to click the menu item we require
    [ ] Agent.SetOption(OPT_VERIFY_COORD,TRUE) //turn on coordinate verification again

Old KB# 20883

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:14
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.