title: How to locate the Dynamic WebElement using WebDriver
body: <p><strong>Automation Specification- Java based WebDriver</strong></p>
  
  <p>Hi<br/>
  i'm working on a webdriver automation(Java code) to automate bus booking.<br/> Here is my scenario....</p>
  
  <blockquote>
    <p>(1)give Departure &amp; Destination - <strong>DONE</strong><br/>
    (2) Pick the Date - <strong>DONE</strong><br/>
    (3)Search Bus -<strong>DONE</strong><br/>
    (4)View Seats &amp; Select- <strong>I Struck here</strong></p>
  </blockquote>
  
  <p>Now as a search result, i got a list of buses with the option to view the seats.
  the list of buses are shown in a <strong>dynamic-DataTable</strong> which contains an image called '<em>view seat</em>' in each row. A click on the <em>viewseat-image</em> will give me the seat-layout where i can select the <em>seats</em>. found the viewseat-images are having <strong>different id's</strong> &amp; the <strong>same class name</strong>. Now i need to locate and click on the viewseat-image whichever i want, using its id. <br/>
  <strong>But the situation is</strong><br/>
  * the data table is dynamic, So the id's keep changing which doesn't allow me to locate it by a static id.<br/>
  * id is the only unique thing in that coding to differentiate the viewseat-image from another. so i can locate it only if i get the id correct.<br/></p>
  
  <p>Now my idea is to, <em>get the runtime id's of all viewseat-images, using the unique class name and store in variables and use the id's to locate the element.</em> <br/>
  So let me know if there any possibility to get the id's of all images in that data table, using the class name. </p>