This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Testing and the fly likes Problem with Radio buttons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Problem with Radio buttons" Watch "Problem with Radio buttons" New topic
Author

Problem with Radio buttons

Pen Pentela
Greenhorn

Joined: May 15, 2008
Posts: 8
Hi All,

Ho wdo i write Http unit for below code, Please help me out


< table id = "t1" width="97%" height="20px" border="0" cellpadding="0" cellspacing="0" class="tdtitles"
tr
td style="padding-left:3px;"width="12% align="center" valign="middle" background="./../../images/date.jpg"

IN
input type="text" id="in" name="in" maxlength="16" class="Textbox" value="" "onKeyPress "="return Numbers(event)" /td
td width="12% align="center" valign="middle" background="./../../images/date.jpg"
input type="radio" name="radio1" id="radio1" "onClick"="select1()" /
Display /td
td width="19%"align="left" valign="middle" background="./../../images/date.jpg"
input type="radio" name="radio2" id="radio2" "onClick"="select2()"/
All /td
td width="12%"align="left" valign="middle" background="./../../images/date.jpg"
input type="radio" name="radio3" checked="checked" id="radio3" "onClick"="select3()" /
Att /td
td width="12%"align="left" valign="middle" background="./../../images/date.jpg"
input type="radio" name="radio4" id="radio4" "onClick"="select4()" /
Min /td
td width="12%"align="left" valign="middle" background="./../../images/date.jpg"
input type="radio" name="radio5" id="radio5" "onClick"="select5()"
List td
td width="12%"align="left" valign="middle" background="./../../images/date.jpg"
input type="radio" name="radio6" id="radio6" "onClick"="selecttm5()" /
Search /td
/tr
/table
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
What have you tried and how does it fail?

Also, I'm surprised you're using HttpUnit since it's a dead project (not maintained anymore). Most people seem to have moved on to HtmlUnit, JWebUnit (which uses HtmlUnit internally), or Selenium.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Pen Pentela
Greenhorn

Joined: May 15, 2008
Posts: 8
Originally posted by Lasse Koskela:
What have you tried and how does it fail?

Also, I'm surprised you're using HttpUnit since it's a dead project (not maintained anymore). Most people seem to have moved on to HtmlUnit, JWebUnit (which uses HtmlUnit internally), or Selenium.


Hi,

I am new to HttpUnit , writing Httpunit cases for my webapplication. I need to write HttpUnit for page validations and js validations I have raio buttons, textfields, checkboxes in my jsp page.

How do i write Httpunit fro all these raio buttons, textfields, checkboxes and javascript. please give me reply
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30789
    
157

Pen,
I don't see the answer to Lasse's question. What do you have so far? Do you have a test that goes to a web page yet?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Pen Pentela
Greenhorn

Joined: May 15, 2008
Posts: 8
Originally posted by Jeanne Boyarsky:
Pen,
I don't see the answer to Lasse's question. What do you have so far? Do you have a test that goes to a web page yet?


Hi,

Please suggest me how do i write HttpUnit for javascript validations like textfiled , checkbox and radio buttons .



Thanks in advance,
BestRegards,
PP
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Are you reading any of our responses? Maybe you should?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42370
    
  64
I'm surprised you're using HttpUnit since it's a dead project (not maintained anymore). Most people seem to have moved on to HtmlUnit, JWebUnit (which uses HtmlUnit internally), or Selenium.


While I agree that working with jWebUnit or Selenium is to be preferred, HttpUnit sprang back to life with a new release last week.


Ping & DNS - my free Android networking tools app
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Ulf Dittmer:
While I agree that working with jWebUnit or Selenium is to be preferred, HttpUnit sprang back to life with a new release last week.

That's good news! Do you have an idea of how the new HttpUnit compares with HtmlUnit with regard to their JavaScript support?
Pen Pentela
Greenhorn

Joined: May 15, 2008
Posts: 8
Originally posted by Lasse Koskela:
Are you reading any of our responses? Maybe you should?


yes, I read your responses, but it is recomended to use HttpUnit for my application.

Thanks for your replies
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42370
    
  64
Pen, what is being commented upon is not so much the use of HttpUnit, but the fact that you still haven't told us what code you have so far, and where specifically you're stuck making progress. If you don't have anything yet, start with the tutorial and cookbook on the HttpUnit web site; those will get you going.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42370
    
  64
Do you have an idea of how the new HttpUnit compares with HtmlUnit with regard to their JavaScript support?

No, I don't. When I last wanted to use it, its dormant status prompted me to look at HtmlUnit (which seems to have had big improvements especially in the JS area) and jWebUnit (which has an API that makes for shorter client code). So the fact that jWebUnit internally uses HtmlUnit -and incorporates its latest versions pretty quickly- made the difference for me.
 
wood burning stoves
 
subject: Problem with Radio buttons