# How to extract individual rows from a table on a web-page using selenium?

**URL:** <https://discourse.nodered.org/t/how-to-extract-individual-rows-from-a-table-on-a-web-page-using-selenium/17439>\
**Category:** General\
**Created:** [2 November 2019 16:04 UTC](https://discourse.nodered.org/t/how-to-extract-individual-rows-from-a-table-on-a-web-page-using-selenium/17439 "2019-11-02T16:04:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gv\_gv](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@gv\_gv](https://discourse.nodered.org/u/gv_gv)\
**Post date:** [2 November 2019 16:04 UTC](https://discourse.nodered.org/t/how-to-extract-individual-rows-from-a-table-on-a-web-page-using-selenium/17439/1 "2019-11-02T16:04:25Z")

</div>

Hi,

So basically i need to extract a table from a web-page and save it into a database.  
To achieve that, i am trying to use 'get attribute' node of selenium where i am extracting 'innerText' of individual row using get by xPath. When i branch out my flow and use get attribute for different rows on the first one works rest do now work.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/c/cb453a67288b32e07377b8dc1d8d72c092154b99.png)

As shown in the picture, the first get attribute node "passes" and the second one get stuck at locating.  
Below is the code

```auto
[{"id":"ee5aca60.aaeac8","type":"inject","z":"9b29502e.1d316","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":1240,"wires":[["9a40011e.4be09"]]},{"id":"9a40011e.4be09","type":"open-web","z":"9b29502e.1d316","name":"test","browser":"chrome","weburl":"https://datatables.net/examples/basic_init/multi_col_sort.html","width":1024,"height":768,"webtitle":"Google","timeout":3000,"maximized":true,"server":"7bc9ab18.469574","x":300,"y":1286,"wires":[["a80bf9d6.f23678","c0394a38.b7f128"]]},{"id":"b2e6a593.f1aa28","type":"debug","z":"9b29502e.1d316","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":630,"y":1380,"wires":[]},{"id":"a80bf9d6.f23678","type":"get-attribute","z":"9b29502e.1d316","name":"","attribute":"innerText","expected":"","selector":"xpath","target":"//*[@id=\"example\"]/tbody/tr[1]","timeout":1000,"waitfor":500,"savetofile":false,"x":420,"y":1380,"wires":[["b2e6a593.f1aa28"]]},{"id":"c0394a38.b7f128","type":"get-attribute","z":"9b29502e.1d316","name":"","attribute":"innerText","expected":"","selector":"xpath","target":"//*[@id=\"example\"]/tbody/tr[2]","timeout":1000,"waitfor":500,"savetofile":false,"x":410,"y":1460,"wires":[["5bf72ce8.fa3364"]]},{"id":"5bf72ce8.fa3364","type":"debug","z":"9b29502e.1d316","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":640,"y":1460,"wires":[]},{"id":"7bc9ab18.469574","type":"selenium-server","z":"","remoteurl":"http://localhost:4444/wd/hub"}]

```
