Reading empty values from elements on a webpage

We are reading data from a webpage using
–Get Value from Browser (which is a grid of data)
XPath: //div[@class=“grid-canvas”]

example html in webpage

< div class=“grid-canvas”>
< div class=“slick-cell l6 r6”>SENT< /div>
< div class=“slick-cell l7 r7”>FILES< /div>
< div class=“slick-cell l8 r8”>12345< /div>
< div class=“slick-cell l9 r9”> < /div>
< div class=“slick-cell l0 r10”>< /div>
< div class=“slick-cell l11 r11”>14/10/2016< /div>
< /div>

It picks up the values SENT, FILES 12345 & 14/10/2016
But it will not pick up fields r9 or r10
r9 contains a single space
r10 is empty.

Is there any way we can extract this information, or at least the single space?

Thanks
Darren.

Hi Darren,

Is the data in a

within that div? If so you should have received a table back. What data structure does it return? Table or just a string? Thanks!

Jan

Hi Jan, sorry just edited my post, as it lost the HTML lol.

yes div’s and lots of them

The line break string I get back looks like this: (surrounded each row with ##)


##SENT##
##FILES##
##12345##
## 14/10/2016##


so looks like space/empty are getting squished

OK, We’ll have to have a look into that - I don’t know from top of my head… Back asap

Hi Darren,

Not 100% sure why it does what it does at the moment but you could use the below workaround:

  1. It gets elements from browser of the parent div
  2. Iterates through those elements
  3. Get the value of each
  4. Outputs into console

You could change nr 4 to add to a list or table.

Let me know if that helps. Thanks!

Jan

Hi Jan

Yes that works as a temp fix, but it is very very slow.

thanks
Darren.