Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dealing with Malformed HTML
#1
Sad 
Hi Guys, greetings from Mexico!

I have to automate a Web-Based application which has a "dirty" HTML code. The issue is that the HTML is malformed (e.g. tables, column and rows not closed, unclosed links etc..) and QTP is not recognizing elements correctly on the page.

I have tried descriptive programming but that's not enough since i'm trying to pull data from tables that sometimes are not recognized. I have also tried pulling data from all "available" tables within the page (even this way... some tables are not pulled, seeem to be invisible)...

Any ideas guys? Really need some help! Sad


Example of my code:
(even using this function, some data is not retrieved)

Code:
tblData = getAllTablesInnerText() Function getAllTablesInnerText() Dim i, num, rc, oDesc, roProperty Dim cadObjs, arrObjs Dim regexBrowser, regexPage Dim innerText Dim textTables roProperty = "innerText" regexBrowser ="title:=.*Enlace.*" regexPage = "title:=.*Enlace.*" Set oDesc=Description.Create oDesc("micclass").Value= "WebTable" Set rc = Browser(regexBrowser).Page(regexPage).ChildObjects(oDesc) num = rc.Count() ' For i=0 To num -1 print "Parseando tabla " & i & "..." innerText = rc(i).GetROProperty(roProperty) textTables = textTables & "<TABLA " & i & ">:" & innerText Next getAllTablesInnerText = textTables

End Function
'********************************************************************************
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Dynamic obj rep - get text in the class (html) marcio cravo moreira 0 2,438 05-26-2015, 06:58 PM
Last Post: marcio cravo moreira
  regular expression in html sujaravi123 0 2,667 12-31-2013, 03:00 PM
Last Post: sujaravi123
  Excel to HTML results keerthi286 1 3,182 04-19-2013, 08:21 AM
Last Post: basanth27
  if double quotes comes in outer html sujaravi123 3 7,658 10-18-2012, 10:16 AM
Last Post: harishshenoy
  Can I use html id as an unique identifier for all the components in a web page qtplearner88 8 9,900 05-21-2012, 06:52 PM
Last Post: falvi

Forum Jump:


Users browsing this thread: 1 Guest(s)