ContributionsMost RecentMost LikesSolutionsSomething I noticed with the Calculator, Themes, and TestCompleteBackground: Testcomplete 10.3, Windows 7. So, I have been training new hires here at my workplace and as an excersize using findchild I wanted them to create a data driven loop that can click on the buttons based on their captions. As expected, when I spied on the calculator I saw useful captions in the name that have all of the characters that actually appear on the calculator (like 0-9, MR, MC, =, +, etc). "Great! this will be breeze!" I said to myself. So I give them the assignment and they are left with nothing but utter confusion. On my machine, since day one I have put it in "performance" mode, also I have my theme set to a windows classic variation because I don't like the way the new windows looks (too distractifying and makes the computer slow). Apparently if a Windows 7 like theme is enabled there is NO value for the wndCaption. When you switch themes you can watch the values disappear in the object browser. This begs a few questions: Why is this happening ? How are these buttons getting their values without captions? Is this unique to the calculator? Should testcomplete always be used with a classic theme as best practice? Very strange... Re: Issues with Firefox EvaluateXPath on First Paragraph Only!It appears this has been fixed in the latest Update... Thanks! will test soon...Re: Issues with Firefox EvaluateXPath on First Paragraph Only!Let me just preface this by saying: this was not a super important test case, just a learning excersize. My goal was to find the first non italicized, non spanning link on the page. Sometimes this link occurs in the first paragraph, sometimes in the second paragraph, sometimes in a List Item tag. Consider the page: http://en.wikipedia.org/wiki/Problem If you used the code provided by smart bear you not be able to get the desired link, which is "Mathematical Problem". The link is in the first list item after the first paragraph. My solution origionally was a big, long XPATH expression that found all of the links on the page and decided which one to click but this is extremely slow, especially on large pages (like Germany's page). My solution then was to get all of the paragraphs and listItems with substantial text in them by findallchildren on textNode, then use xpath on each individual textNode element to see if it has what we needed. I greatly simplified my code for this posting, but this method was much faster. SmartBear support: this is not what I was trying to do at all. Also, the textNode elements DO HAVE children. In my OP, if you change the array's index to evaluateXPath on the second paragraph you will see it finds the links there perfectly okay! You can see the children in the debugger! Why does the first paragraph, and only the first one, give you this strange error? That is the question. Re: Issues with Firefox EvaluateXPath on First Paragraph Only!Thanks for your help, contacted supportRe: Issues with Firefox EvaluateXPath on First Paragraph Only! Try it! The line that generates the error is here: Log.Message("Link " + i +":" + newArray2.innerText); The error is generated because the arrays objects have no data or members in them, even though they definitely should be fine. The exact message: "An unspecified error has occured" From the log's additional info: Unspecified error Error location: Unit: "TestTests\PhilosophyWiki\Script\XPathTest" Line: 73 Column: 9. And yes, same exact page structure in the object browser. ... Issues with Firefox EvaluateXPath on First Paragraph Only! Hello TC forums! First time poster here Consider the code below. This code is meant to search any wikipedia page and find all of the links in the first paragraph (in this case I hardcoded the URL in and specified the first paragraph directly). The code works by using the findAllChildren method to find all of the elements in the main area with text in then. Near the end of the array is the first paragraph, on which I use an XPath expression to create an array with the links. function Test() { // Obtain the Page object var url = "http://en.wikipedia.org/wiki/Siyaram_Gangwar"; Browsers.Item(btFirefox).Run(url); var page = Sys.Browser("*").Page("*").Panel("content").Panel("bodyContent").Panel("mw_content_text"); var tmp = page.FindAllChildren("ObjectType", "TextNode", 1); // Check the result if (tmp != null) { // Convert the array to the JScript-compatible format var arr = (new VBArray(tmp)).toArray(); for (var i = 0; i< arr.length; i++) Log.Message(arr.innerText); //for this particular page the element we want is the 13th item var newArray = arr[12].EvaluateXPath("(/a|/a/b)[contains(@href, 'wiki')]"); var newArray2 = (new VBArray(newArray)).toArray(); for (var i = 0; i< newArray2.length; i++){ Log.Message("Link " + i +":" + newArray2.innerText); } } else { // If nothing was found, post a message to the log Log.Error("Nothing was found."); } } The Result: “An unexpected error has occurred”. Now try changing btFirefox to btChrome and it will work fine! Try switching back to FF then using the second paragraph instead of the first (use arr[8] instead of arr[12]) and it will find all of the links in that paragraph! If you throw a breakpoint in there you can see that newArray2 is an array of Objects each one is a link with many members. Now switch it back to the first paragraph and you can see these Objects have no members or information in them at all! The right number of links is there (4) but there is no info in each one. Is this something I am coding wrong, an issue with Firefox, or an issue with TestComplete10? I am perplexed as to why this works in some cases and not others. Try other paragraphs on other wikis and you will see what I mean. Any help with this is much appreciated! Additional info: Windows 7, TestComplete10, Firefox 26.0, Chrome 32Solved