Navigation

    OpenIAP

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Problem retrieving data from a table

    General Discussion
    table grabber too much data
    2
    3
    25
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rjvanschoonhoven last edited by rjvanschoonhoven

      Hi Allan,

      I have a problem with a table that gives back too much data.
      Instead of the value of one cell it returns all the values of the whole row in 1 string.
      This is the table:
      Vessels_problem_table.jpg
      This is my RPA part:
      RPAVesselTableproblem.jpg
      The selectors look like this:

      "xpath": "/html/body/form/div[4]/table/tbody/tr/td[1]/table/tbody/tr/td/div/div/div[2]/div[2]/div[6]/div[1]/table/tbody/tr"
      and
       "cssselector": " td:nth-child(2)"
      

      And this is the output:

      [08:32:51.878][Output] GetVesselData completed in 00:01.582
      [08:32:51.874][Output] NAme: 	APL MERLION	9632014	-	-
      [08:32:51.363][Output] NAme: 	XOBSELETE DUPLICATEAPL MERLION	-		-
      [08:32:50.842][Output] NAme: Link
      	
      Name
      	
      IMO
      	
      Obsolete
      	
      Nationality
      
      

      I wrote NAme like that on purpose. A colomn header is also named 'Name'.
      The first result is actually the header of the column. I don't see that in my other table grabbers.
      Do I do something wrong, or did I hit a bug 🙂 ?

      Kind regards,
      Rutger van Schoonhoven
      (I removed the ToString() part in item.Value.ToString(), but that changes nothing.)

      Allan Zimmermann 1 Reply Last reply Reply Quote 0
      • Allan Zimmermann
        Allan Zimmermann @rjvanschoonhoven last edited by

        So here is what you are suppose to do.

        1. add a Get Element that grabs all the <tr>'s set MAxResults to something big.
        2. Inside the Get Element add another one or more Get Element and get the <TD>'s you need
          That way the second Get Element will be called one time per row
          In your screenshot you are not doing anything with the nested get element, so item will contain the ROW not a specific cell.
          Also, for html, it's often better to use item.Text than Item.Value, but you can play around with both and see what works best for you.
        R 1 Reply Last reply Reply Quote 0
        • R
          rjvanschoonhoven @Allan Zimmermann last edited by

          @allan-zimmermann
          As usual the bug is found between the sceen and the backrest of the chair. (feeling stupid)
          Thanks Allan.

          1 Reply Last reply Reply Quote 0
          • Locked by  A az 
          • First post
            Last post