Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF validations capture using Selenium

 
Kavala Naresh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
Naresh
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18001
47
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic