Hi I am looking to get Tool tips for this chart - Donut chart. I tried lot of variation to have tool tips but Its look like its coming from JavaScript so I am not able to get it.

1 Answer 1


I was able to get it using Chrome's Dev Tools. Here is how:

  1. Right-click on the blue section of the pie chart and select 'Inspect'
  2. Right-click on the highlighted element in the 'Elements' tab of DevTools
  3. Select :hover to apply the hover state
  4. you'll see a new div is added below the SVG, something like *...div class="amcharts-ballon-div"...*
  5. Expand the tree to find the element that contains the text
  6. Right-click on that element and select "Copy" > "Copy Selector"
  7. Test the selector in the Console tab of DevTools by doing document.querySelector("paste_selector_here")

For me, document.querySelector("#chartdiv > div > div.amcharts-chart-div > div > div") returned the element in question.

In a test remember to first do a Hover using the Actions class in the Selenium library.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.