title: How do I verify that certain method was called on javascript object with Selenium?
body: <p>I would like to verify with selenium that certain method (with parameters) was called on 
  JavaScript Object - kind of expectation mocking with JMockit, but in Javascript and selenium. </p>
  
  <p>Unfortunately object is heavily obfiscated opaque website performance tracker and I can not access its internals, so mocking seems to me the only option.   Or do I miss something obvious?</p>
  
  <p>Update:  after thinking about it, it seems to me that solution could be:
   - wait for HTML to load completely 
   - remove certain script tag  containing performance tracker
   - create javascript mock object behaving like tracker but recording  invocations for later use</p>