Why not just extract out the org.openqa.selenium.remote.CommandExecutor, wrap it up with a decorated one, which does extra things based on the incoming org.openqa.selenium.remote.DriverCommand before/after executing the actual command ? That way you can execute your custom code and also not have to worry about building your wrapper class as well.
Ideally speaking, EventFiringWebDriver was created for this very need, but since it doesn’t support Actions class, the org.openqa.selenium.remote.CommandExecutor approach would be the easiest way out.
Please take a look at my blog post : https://rationaleemotions.wordpress.com/2015/04/18/eavesdropping-into-webdriver/ which shows all of this in action.
Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/84bc6029-f465-414b-bbe7-36d330677474%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.