Safari: Click a button (with java script?)

take a look at this: Click item on Chrome or Safari page by XPath