Finding all the objects on an webpage
Can some one tell me, if there is any inbuilt method to find out all the objects available in an webpage.
Re: Finding all the objects on an webpage
You can use the FindAll method of the Page object. Here is sample code in JScript that demonstrates searching for objects at yahoo.com in Internet Explorer:
<font class="small">Code:</font><hr /><pre>
var objects, cnt;
objects = Sys.WaitProcess("iexplore", 10000).ToUrl("http://www.yahoo.com").FindAll("Name","*",1000);
objects = objects.toArray();
cnt = objects.length;
if (cnt > 0)
Log.Message(cnt + " object(s) were found:");
for (i = 0; i < cnt; i++)
Log.Message("No objects corresponding to the specified criteria were found.");
For more information, refer to the 'FindAll Method' help topic .