Xpath not picking text which is outside the page height

I have to get all the anchor text of a table row and table rows are around 200 which is displaying with scrolling on the page. Get web element action only get the list of anchor text which is display in the page.
e.g. if page display only 30 rows at a time it picks only 30 anchor texts all remaining list get as blank record in variable list.
Could you please provide the solution for this issue?

1 Like

Hi @vermaj2 it is possible that the DOM of the page is built dynamically, and new elements only appear during scrolling.

Try adding actions to scroll (or press Down key) until you reach the end of the table. Perhaps, jumping to the end of the page by pressing End will help, too.

Hi @ashapkina,
I had done the same way , first scroll down to end of the page and then pick all the anchor element.
But it works only when i put text in use element attribute option.

Same issue i am facing when getting the text inside td element.When i am putting text in attribute option i am getting nullpointerexception.
Any solution for this?

Try using attribute “value”, not “text”.

I tried using value attributes but giving the same null pointers exception.
When i am using without atrribute its picking text of only the list visible in screen window not all the text from all rows even though i have moved the scroll to the end.
What is the solution for this?

When you scroll to the end of the page, is the whole table loaded?
Can you share the URL of the webpage in question?

Yee whole table loaded and when i try the xpath in inspect element page it gives correct result.
Url can not be shared as data is confidential.

List gives some results and outside page gives blank values

Hi @ashapkina,
I have another scenario, the table has 30 rows in which 27 rows are displaying in screen and 3 are outside screen with scroll bar.
all the 30 rows are render as soon as web page loaded.
when i use to get the value of first column using relative or absolute path the return variable list gives last 3 rows value as blank.
Could you please suggest what could be the resolution for this issue?
Thanks,
Jitendra Verma

@vermaj2 sorry, I didn’t manage to reproduce this issue. If you cannot share the web page you use, can you share some other page on which you can reproduce this issue so we can test?