I have a web page with a list of entries, and each entry is a div with class 'feedEntryContent' and includes an unordered list. I am trying to grab the information in the second list item in each and use these as query parameters in the application. The page that I am trying to parse is an RSS feed which is in an xml format with html inside. Using regular xpath did not work, so I tried loading the XMLDOM, and I was successful at least getting the number of items in the list, but I could not get the text inside. The xml had a 'Content' node, but getting the nodeValue yielded nothing. The steps I used were: Const XMLDataFile = "http:///alertstore/nrl-safe?" Set xmlDoc = CreateObject("Microsoft.XML.DOM") xmlDoc.Async = False xmlDoc.Load(XMLDataFile) Set nodes = xmlDoc.SelectNodes("//content") msgbox "Total nodes: "&nodes(0).NodeValue
I had tried to get a collection of these lists though Description.Create(), but that also did not work. I tried
Set oDesc = Description.Create() oDesc("xpath:=//div[contains(@class,'feedEntryContent')]/ul/li") Set colObject = Browser("title:=nrl-safe").Page("title:=nrl-safe").ChildObjects(oDesc) msgbox "The number of entries on this page is "&colObject.count
but the msgbox always gives me 0. I discovered that even when I locate the object using Firepath and use the exact xpath, it did not work here. I have attached an example that I had to type from scratch since I could not copy it from a classified system, but it gives the basic structure of the xml page.
WebElement().Click not working on AUT. 2 Answers