ContributionsMost RecentMost LikesSolutionsRe: Search for an element within a DIV on a web pageThanks for looking over the files Allan, that seems to have solved the problem.Re: Search for an element within a DIV on a web pageI have sent in both a VB and a Java version of the project. Please let me know what the fix is for both versions.Re: Search for an element within a DIV on a web pageI replaced the Array statements with this: PropArray = new Array("ObjectType", "id"); ValuesArray = new Array("Link", "muppet"); According to your explanation, this is now searching for an object type of Link (from the Object browser) that has an id of "muppet". I get the error "Object required" for the PropArray line. What is wrong with this code?Re: Search for an element within a DIV on a web pageThis is what I tried next, and it doesn't work: function search_in_a_div() { var app, testfile, myPage, mySection, myLink; var PropArray, ValuesArray; var ConvertedPropArray, ConvertedValuesArray; app = TestedApps.iexplore.Run(); testfile = "file:///" + Project.Path + "search-test.html"; Log.Message(testfile); myPage = app.ToURL(testfile); // search for the link "Click" and click it mySection = myPage.NativeWebObject.Find("id", "second_section"); if (mySection.Exists) { Log.Message("Found second_section"); // now search WITHIN this DIV for an element with the id of "muppet" PropArray = new Array("div", "id"); ValuesArray = new Array("muppet", true); // Converts arrays ConvertedPropArray = ConvertJScriptArray(PropArray); ConvertedValuesArray = ConvertJScriptArray(ValuesArray); myLink = mySection.Find(ConvertedPropArray, ConvertedValuesArray, 5); if (myLink.Exists) myLink.Click(); else Log.Warning("No link here"); } else Log.Warning("No second_section here"); } function ConvertJScriptArray(AArray) { // Uses the Dictionary object to convert a JScript array var objDict = Sys.OleObject("Scripting.Dictionary"); objDict.RemoveAll(); for (var j in AArray) objDict.Add(j, AArray ); return objDict.Items(); } Search for an element within a DIV on a web pageOur application is large, and Page.NativeWebObject.Find("id", "myID") is crushingly slow. I need to narrow down the search to a specific DIV within the web page. I've tried this: function search() search() { // this will always find the first link var app, testfile, myPage, myLink; app = TestedApps.iexplore.Run(); testfile = "file:///" + Project.Path + "search-test.html"; Log.Message(testfile); myPage = app.ToURL(testfile); // search for the element ID "muppet" and click it myLink = myPage.NativeWebObject.Find("id", "muppet"); if (myLink.Exists) myLink.Click(); else Log.Warning("No link here"); } What I want to do is search for a link within a DIV with the ID "second_section" (<div id="second_section">) How do I do this, in vbscript and in jscript, for IE7 and IE8? I've been looking at the FindChild method, and the Find method, and the documentation doesn't help. Re: Page object to Window objectOK, I'll try that solution. The reason I need this is I'm trying to tie recorded and written scripts togteher, and it's not possible when the recorded script insists on generating its own Window and Page objects. I need to just hand them in and have the recorded part just work. Right now it blows up with "Object not found" errors. Or is it just not possible to mix recoeded and written scripts?Re: Page object to Window objectThat works for a single instance of IE, how would I be able to get the window object from my page object if there were multiple browser windows open at once? I already have the page object, how do I get from that page object to the window that page is displayed in? Re: Page object to Window objectOK, I tried again, I can get the page without reloading, this is good. However, I still can't get the window from the page. Re: Page object to Window objectI tried both methods, and neither worked. function FindWindow(myPage) { // starting with a Page object, can I maximise a window? var myWindow; myWindow = myPage.Application.Document.Script.window; myWindow.Maximise(); // window did not maximize, no exception or other data } function GetPageWithoutReloading() { var myPage; myPage = Sys.Process("iexplore").Page("*"); // Triggers an exception with no description. } I can send you the code I'm using, I don't know what else to do. We need a tool that can let us script our application and if I can't access both Page and Window objects reliably and repeatably, we can't use TestComplete at all. Re: Chrome, Opera supportDefinitely need Chrome support, also Safari