I am using selenium webdriver to test my web application being developed using primefaces. I want to capture all validation messages and test results of selenium scripts into a log file.
i.e messages captured into FacesMessage or Primefaces framework related messages being thrown during execution ..etc.
As far as I explored Selenium will not go beyond browser to get the data.
Could somebody please guide, can I achieve this using Selenium or Selenium+TestNG?
Selenium is strictly a client-side mechanism. It cannot access webapp internals. Actually, no client-side mechanism should be able to arbitrarily access webapp internals, for obvious security reasons, but selenium has the same restrictions as any other web client.
I am not a big proponent of tests that capture a lot of stuff to logfiles. Ideally, tests should indicate only success/failure, and only the failures should go into details. As projects get bigger, if you log everything, you risk losing important information in the crowd, so to speak.
Selenium tests can be converted into program source code to produce a stand-alone test application.
An IDE is no substitute for an Intelligent Developer.