So I found out it’s not so documented, hopefully google will index this. I have a page on my system that shows a google geo chart (same as this) When clicking on a country on the map lot’s of interesting things happens. And I wanted to implement a ui automation test to cover this use case.
It’s not so easy cause even if you find the right svg path object and try clicking on it you get some interception errors. So I googled a bit without any luck, but the geo chart documents came to the rescue.
This code triggers an event on the chart object that the United States region was clicked. super simple and easy I’m using capybara and it looks like this:
It’s just injecting a self executing function to the page.