If you have worked with UFT/QTP, you must be pretty familiar with the ChildObjects method but in case you have not, this method is used to find a collection of objects that match a given set of description properties.
For example, if you google “leanft tutorial”, and you want to find out how many links are redirecting to this blog, you will have to write code in the following way:-
LinkDescription targetLinks = new LinkDescription.Builder() .href(new RegExpProperty(".*learn2automate.*")).tagName("A").build(); Link myBlogLinks = browser.findChildren(Link.class, targetLinks); Assert.assertTrue("There should be atlease 1 Link present", myBlogLinks.length>0);
So here the ChildObjects method(from UFT) is replaced by the FindChildren method and the logic more or less remains the same.
Please comment if you face any issues while executing this.