File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 17417

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.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: JSF validations capture using Selenium
It's not a secret anymore!