Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HttpUnit to test JSF applications

 
Abhijit Sontakey
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using HttpUnit to perform automated testing of web applications uilt using JSF framework. However i am unable to test components of JSF framework that involve more than 1 screens and passing arguments from more than 1 component to other. I tried getting Webform from Webresponse and using WebForm.submit() to navigate to another screen, but this doesn't work.Can anybody help. Any help will be appreciated.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How does the WebForm.submit() not work? How does the generated HTML for the submit button look like?
 
Abhijit Sontakey
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The submit button looks as mentioned below

button name='submit_search_0' on..click.=setKeys(event)
However the actual problem is i am getting a Response from a request and retrieving the webForm from the request. After retrieving the WebForm from WebResponse, i am submitting the form.
As can be seen from the code, button is calling a javascript function that calls a method in the Component class. Hence when i submit the form, it simply loads its again.
 
Abhijit Sontakey
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The submit button looks as mentioned below

button name='submit_search_0' on..click.=setKeys(event)
However the actual problem is i am getting a Response from a request and retrieving the webForm from the request. After retrieving the WebForm from WebResponse, i am submitting the form.
As can be seen from the code, button is calling a javascript function that calls a method in the Component class. Hence when i submit the form, it simply loads its again.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic