This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hai All, I am testing a website using HttpUnit. The website uses Javascript Redirects instead of plain Html Links. How can I test these Links using HttpUnit. Thanking You . [ October 19, 2005: Message edited by: Kiran sss ]
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35253
7
posted
0
What happens when you test them with HttpUnit? Does it not work? If not, in what way, any error messages?
By the way, your display name does not conform to the JavaRanch policy. You should correct it.
The link click is not working for the Javascript Redirects. No error messages ,but I am not even able to go to the next page. The same code is working with normal Hyperlinks.
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
5
posted
0
Could you post the JavaScript snippet(s) that are not working? I assume you've already tried to compare what functions you use to the list of supported functions?
Both these links point to two different links and pages but show the same URL.
The JavaScript function which is being called:
[ October 24, 2005: Message edited by: Lasse Koskela ]
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
5
posted
0
Well, nothing jumps out at least to my eyes. I'd suggest the brunt force approach -- commenting out "extra" bits of the JavaScript to find out the minimal working set and then start uncommenting things until you find the part that HttpUnit's Rhino JavaScript engine can't deal with. (And then try to come up with another bit of JavaScript that it can deal with)
By the way, are you using IE specific stuff in there?
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
5
posted
0
Oh, and Ulf is correct -- your display name does not conform to the policy, which only allows initials for the first name, not the family name. We'd appreciate it if you could take a minute to edit your profile. Thanks.
Venkata Kiran
Ranch Hand
Joined: Sep 06, 2005
Posts: 30
posted
0
Are there any links to verify how HttpUnit works with Javascript Redirect & frames.
Venkata Kiran
Ranch Hand
Joined: Sep 06, 2005
Posts: 30
posted
0
is the problem bcos of the links being within <td> tags. Is link click from <tr> supported in Httpunit now. I saw this link & understood that the click was not working previously. http://sourceforge.net/tracker/?group_id=6550&atid=356550 Request Id :1090785
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
5
posted
0
Originally posted by Kiran Kumar: is the problem bcos of the links being within <td> tags. Is link click from <tr> supported in Httpunit now. I saw this link & understood that the click was not working previously. http://sourceforge.net/tracker/?group_id=6550&atid=356550 Request Id :1090785
What that request is about is not your situation. The request talks about having something like this:
while you have something like this:
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
5
posted
0
Originally posted by Kiran Kumar: Are there any links to verify how HttpUnit works with Javascript Redirect & frames.
I'm not aware of any (but I also haven't looked).
What I'd suggest is try things out in a small, simple, isolated sandbox until you get an idea of what works and what doesn't.
For example, you could quickly sketch up a simple set of framed HTML pages with the simplest table you can think of, having the links and pieces of JavaScript you have in the actual application. You could dump these files on Apache and start hacking with a very fast cycle of 1) edit html/javascript, 2) verify visually in a browser, 3) run a simple HttpUnit test to see if HttpUnit can deal with what you have.
I'm not sure if you've already tried what I suggested earlier, about commenting out stuff that's sort of "extra". I'd probably start by commenting out these two pieces:
(simply because I can't see their sources and so I'm tempted to believe they might be doing something non-compatible)
Venkata Kiran
Ranch Hand
Joined: Sep 06, 2005
Posts: 30
posted
0
The JS code is from a client's site which I am testing so I can't minimise or remove any part of the Javascript code. But I found out this link which describes similar problem but used images instead of normal text for hyperlinks :
Trying out on that basis. Thank u for the help. [ October 26, 2005: Message edited by: Kiran Kumar ]
Venkata Kiran
Ranch Hand
Joined: Sep 06, 2005
Posts: 30
posted
0
Hai , r there any examples for using WebWindow or WebClient in HttpUnit. Thank u in advance.
Mat DeLong
Greenhorn
Joined: Dec 08, 2005
Posts: 2
posted
0
Has a solution to this been found? I was using one version of httpUnit (unknown) and switched to another, and then my links which called javaScript functions stopped working.
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
5
posted
0
Generally speaking, if HttpUnit/jWebUnit/HtmlUnit/whatever tool you're using suddenly stops supporting the kind of JavaScript you have in your application, I'd recommend taking it up on the respective tool's mailing list. If the JavaScript you've used is cross-browser compatible (or standard) then it's likely a bug. If not, then you should probably change your application anyway.
Venkata Kiran
Ranch Hand
Joined: Sep 06, 2005
Posts: 30
posted
0
Sorry I was not able to get any break through and had to leave that in middle.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.