Forum Discussion
rraghvani
2 years agoChampion Level 3
Also read through Addressing Objects in WPF Applications.
Here's an example that uses the FindAll method, and highlights only 5 buttons
function FindButtons()
{
// Open https://www.w3schools.com/css/css3_buttons.asp
var browser = Sys.Browser("chrome");
var page = browser.Page("https://www.w3schools.com/css/css3_buttons.asp");
var main = page.Panel("belowtopnav").Panel(0).Panel("main");
var buttons = main.FindAll("ObjectType", "Button", 1);
Log.Message("Number of buttons in page " + buttons.length);
for (var i = 0; i < 5; i++) {
Sys.HighlightObject(buttons[i]);
}
}
FindAll method only returns an array of the objects, and doesn't perform anything else.
Related Content
- 2 years ago
- 14 years ago
Recent Discussions
- 9 hours ago