SVG tags and Css Selectors
Sample:
<div id="fsdf" class="dsdfds"/>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="264" height="250"/>
<defs/>
<rect rx="dsfd" ry="45" fill="sdf"/>
<g class="highcharts-tracker" zIndex="1"/>
<g />
<rect fill="rgb(123,222,222) NEED TO GET HERE />
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="264" height="250"/>
<defs/>
<rect rx="dsfd" ry="45" fill="sdf"/>
<g class="highcharts-tracker" zIndex="1"/>
<g />
<rect fill="rgb(123,222,222) NEED TO GET HERE />
1. //[local-name()='svg']
2. //*[local-name()='svg']
3. //*[local-name()='svg']//*[local-name()='g']
4. //*[local-name()='svg']//*[local-name()='g'][1]
5. //*[local-name()='g'][@class='highcharts-tracker']/*[local-name()='g']
6. //*[local-name()='g'][@class='highcharts-tracker']/*[local-name()='g']/*[local-name()='rect'][1]
7. //*[@class='highcharts-tracker']/*[local-name()='g']/*[local-name()='rect'][1]
8. //*[@class='highcharts-tracker']//*[local-name()='rect'][1]
driver.findElement(By.xpath("//*[@class='highcharts-tracker']//*[local-name()='rect'][1]")).click()
OTHER EXAMPLES
driver.findElement(By.cssSelector("//*[local-name()='svg' and namespace-uri()='http://www.w3.org/2000/svg']//*[local-name()='tspan' and text()='Me']"));
driver.findElement(By.cssSelector("//*[local-name()='svg' and namespace-uri()='http://www.w3.org/2000/svg']//*[local-name()='tspan' and text()='You']"));
driver.findElement(By.cssSelector("//*[local-name()='svg' and namespace-uri()='http://www.w3.org/2000/svg']//*[local-name()='tspan' and text()='None']"));
Ref:
http://automatethebox.blogspot.in/2012/10/how-to-locate-element-in-svg-tag-in.html
https://code.google.com/p/selenium/issues/detail?id=6441