This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes JSF and the fly likes JSF validations capture using Selenium Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF validations capture using Selenium" Watch "JSF validations capture using Selenium" New topic

JSF validations capture using Selenium

Kavala Naresh

Joined: Sep 10, 2012
Posts: 3
Dear Ranchers,

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?

Warm Regards,
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16897

Welcome to the JavaRanch, Kevala!

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.

Customer surveys are for companies who didn't pay proper attention to begin with.
It is sorta covered in the JavaRanch Style Guide.
subject: JSF validations capture using Selenium
It's not a secret anymore!