You can find elements with xpath, or css. I use Selenium in Java (Eclipse) with JUnit, and here are an example code to find elements with xpath:
@Test
public void test1() throws Exception {
WebDriver driver = new FireFoxDriver();
String url = "example.html";
driver.get(url);
Thread.sleep(5000);
WebElement anotherChart = driver.findElement(By.id("another chart")); // find element by id
String anotherChartText = anotherChart.getText(); // Use getText to check data ("blah blah")
WebElement miscChart = driver.findElement(By.cssSelector("#another chart")); // find element with css
String attribute = miscChart.getAttribute("data-chart"); // Get the specified attribute of the WebElement ("5")
WebElement chart6 = driver.findElement(By.xpath("//div[@id='charts-6']")); // find element with xpath
WebElement numRec = driver.findElement(By.xpath("//div[@id='numRecs']")); // find element with xpath
WebElement numRecChart6 = numRec.findElement(By.xpath("div[@id='charts-6']")); // You can use WeElement.findElement() method to find an object in the WebElement
driver.close();
}
I think xpath and css are helpful for you. To check your code, you can use xpath testers: http://www.freeformatter.com/xpath-tester.html#ad-output