Tuesday, January 26, 2016

Find text in table without table iteration

Normally we follow the approach of iterating table, find the required text and perform some operation on same row. This approach is fast for small table but when it comes to very large table iteration will be slow enough.

Instead without iterating the table find the text using xpath and perform operation on same row.

Let take an example:

From above table we want 'Travel' time (column = 7) of particular train from 'Train No' (column=1).

String travelTime = driver.findElement(

Travel time: 15.35

No comments:

Post a Comment