Posts Tagged ‘javaScript’

Use JQuery to get data from specific html table column

One of the gigs I am currently working on is to load test a web application. I needed some ids to feed my load test scripts but I didn’t have access to the database. I can view the information on a grid on one of the HTML pages. I solved the problem by using JQuery to query the HTML table and extract the ids I need. The id column is the second column on the grid and hence I am using eq(1) in the script below.

Click F12 to open the dev tools and I excuted the following scripts to get the ids  I needed.

$(‘table > tbody > tr’).each(function(i) {

console.log( $(this).find(‘td:eq(1)’).text())


Categories: javaScript, Uncategorized Tags: ,