Expand a list item
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Expand a list item
Hi,
I want to select a random list from a list of few items and expand it by index.
I wrote a function to get the random list and select it but have some difficulties expanding it.
// Select random action from the actions list
ActionToSelect = Random(1, Aliases.CCM.MainFrame.ContentControl.StackPanel.Control2.ListBox.wItemCount)
Aliases.CCM.MainFrame.ContentControl.StackPanel.Control2.ListBox.ClickItem(ActionToSelect)
How can I expand the selected list item by index (Dblclick won't work here as the expanding should be perfomed from the expander, triangle icon in this case).
Thanks
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maxvalue = Aliases.CCM.MainFrame.ContentControl.StackPanel.Control2.ListBox.wItemCount
Log.message ("Maxium Number of Value in the list: " &Maxvalue
//Prevents out of bound
RandomValue = Random(Maxvalue)
Log.message ("Random Value in the list: " &RandomValue
Aliases.CCM.MainFrame.ContentControl.StackPanel.Control2.ListBox.ClickItem(RandomValue)
Vallalarasu Pandiyan
https://www.linkedin.com/in/vallalarasupandiyan/
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a keyboard shortcut for doing the expansion? Like a right arrow or enter or tab? I think it would be a bit tricky and a lot of code to find the triangle icon you're talking about (at least, sight-unseen not knowing what the component looks like). I would simply send a "Keys" command to the control once you've selected the item you want and try that short cut.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
