Bug 17252 - HTML Link Parser seems not work properly.
Summary: HTML Link Parser seems not work properly.
Status: RESOLVED WONTFIX
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 1.8.1
Hardware: Other other
: P5 enhancement with 1 vote (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-20 17:58 UTC by Paulo Gustavo Veiga
Modified: 2017-02-26 20:19 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paulo Gustavo Veiga 2003-02-20 17:58:35 UTC
Hi, all,

I’m trying to develop a Test in which one request need parameters form the 
previous one.
I developed similar tests using the Jmeter 1.7.2 using the HTML Link Parser 
modifier.

Now, I’m trying to develop a similar test using the JMeter 1.8.1 and the 
parameters that I want to replace are not found.

This is the response page from the previous requests. I could not find if the 
problem is in the response. However, this problem happened also with other 
pages.

In this case the “pepe” parameter is not found:

HTTP/1.1 200 OK
Server: Resin/2.1.3
Cache-Control: private
Set-Cookie: FUEGO_PARTICIPANT_ID=paulo; Path=/portal4.5; Expires=Thu, 27-Feb-
2003 17:49:06 GMT
Set-Cookie: FUEGO_PARTICIPANT_AUTOLOGIN=null; Path=/portal4.5; Expires=Thu, 01-
Dec-1994 16:00:00 GMT
Set-Cookie: FUEGO_PARTICIPANT_PASSWORD=null; Path=/portal4.5; Expires=Thu, 01-
Dec-1994 16:00:00 GMT
Set-Cookie: JSESSIONID=arC41PKJPBSg; Path=/
Content-Type: text/html
Content-Length: 539
Date: Thu, 20 Feb 2003 17:49:06 GMT



<html>

<head>
    <title>Fuego - Work Portal</title>

</head>


<body onLoad="checkBrowserSupport()">

<form method="post" action="pepe?miParam=true" name="useragentinfoform">
    
    <input type="hidden" name="useragentinfo" value="true">
    <input type="hidden" name="useragentinfojavapluginenabled" value="cure">
    <input type="hidden" name="useragentinfotimezone" value="">
    <input type="hidden" name="pepe" value="123123">
    
    
    <input type="hidden" name="submitbutton" value="Login">
</form>


</body>
</html>

Do anybody want the process to check this ?

Thanks all for your time.
Paulo
Comment 1 Paulo Gustavo Veiga 2003-02-20 20:18:52 UTC
I found the problem. :)

The problem is that I can’t get parameters from a html form that has a action 
attribute URL distinct to the URL path of the request in witch want to replace 
it.

Here an example:

If the response from a http request is the following:

<html>
<head></head>
<body>
<form action=”servlet/myJsp” >
	<input type=”hidden” name=”miParam” value=”someValue”>
</form> 
</body>
</html>

And the next request that contains that HTTP Link Parser has the following 
URL path:  /portal4.5/servlet. 
I this context, the ‘HTTP Link Parser’ does not get ‘miParam’ hidden parameter.

You should take into account that I could change the form action using Java 
Script and the problem will be the same. 

If you want to hear some suggestion, I recommend don’t do this type of check. 
What do you think? .

Best Regards.
Paulo
Comment 2 Mike Stover 2003-04-24 22:03:20 UTC
I'm not sure what to do with this.  Would it be a good idea for the link parser
to ignore the path element of a link? Should it check that only the arguments
match?  Any comments from anyone?
Comment 3 Paulo Gustavo Veiga 2003-06-18 15:40:37 UTC
I have been thinking in one solution. I suggest only matching with the form 
action without the query string.  This is to solve the problem that I explain 
previously.

This solution brings us a new problem. Which of the selected form does the 
JMeter select?. The current implementation is select one in a random mode. 
This almost always is not the expected behavior. I think that the JMeter user 
should have the ability to select one of them. 

In a typical test you know what will be the returned response. Then, you 
should have the ability to select one of all the returned forms 

Do I have been clear with my solution?

Thank for your help.
Comment 4 Anthony Whalley 2004-01-07 23:16:13 UTC
OK I am using v 1.9.1 from source and and for me the HTML Link Parser is  
still not working properly. 
 
I have just received a legacy app where the developer is posting forms  
	and the form also sends a querystring up to the server. 
	i.e.  
		<form action="dosummat.asp?aqry=1" action="POST"> 
			<input type="text" value="aval" name="txt1"/> 
			<input type="submit" /> 
		</form> 
 
	My dosummat.asp page needs both aqry and aval and aqry is a key 
	generated by the database 
	(Bloody ASP developers eh ;-)) 
	 
	I am using Java 1.4.2 and I have modified HtmlParser.java  
	so the calls to the setPath method on the 
	HttpSampler url object to simply accept parsedUrlString. 
	 
	e.g. url.setPath(parsedUrlString) ; 
 
	This gives me the functionality I require. 
 
	However another bug has appeared here. 
	The final else that uses 
 	the Url object does not convert my regex of .* to my former path. 
	so the above form fails with 
		 
		http://10.0.0.1/.* 
	 
	but the form below form will work. 
 
		<form action="/dosummat.asp?aqry=1" action="POST"> 
			<input type="text" value="aval" name="txt1"/> 
			<input type="submit" /> 
		</form> 
	 
	 
	I have made all the mods to get this as I want it but it is not  
	integrated into the GUI as an option. 
	IE change the radio buttons GET or POST to checkboxes GET and POST. 
	 
Should I leave it there or does somebody want to see the code. 
 
Regs 
 
Anton 
 		  
Comment 5 Craig Palmer 2004-04-27 04:47:30 UTC
I hit this exact problem as well (should have checked the bug list before
diagnosing it myself). But to add an extra dimension, things get worse when
dealing with https - maybe this is a different issue. However, the getProtocol()
is failing for me because the config protocol assumes http. In the web page, the
link is relative.
Comment 6 Philippe Mouawad 2017-02-26 20:19:39 UTC
No more development on a feature that will be probably deprecated in a future version.
Comment 7 The ASF infrastructure team 2022-09-24 20:37:29 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1040