What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

HTTP Transaction Sensor - How to POST radio button value?

Votes:

0

Good morning all,

I've set up aN HTTP Transaction sensor to monitor one of our webforms. The form itself requires lots of mandatory fields to be completed, that are free-text, which I've manage to do quite happily and validated it is working. However, one of the fields is a policy type and requires for the end user to select one of the 7 radio button options. How on earth do I submit that field=value via the POST submission?! I've tried a few options and had a google, but not getting very far sadly.

Also, to end, the very bottom of the form has a 'submit' option - how would one go about sending through the submit value?!

I've captured the sensor HTML result to assertain the field names etc, the radio button element is as per below:-

{"type":"radio","options":[{"label":"Life Insurance","value":"Life Insurance","selected":false},{"label":" Life Insurance with Critical Illness","value":" Life Insurance with Critical Illness","selected":false},{"label":" Income Protection","value":" Income Protection","selected":false},{"label":" Mortgage Payment Protection","value":" Mortgage Payment Protection","selected":false},{"label":" 50+ Life Insurance","value":" 50+ Life Insurance","selected":false},{"label":" Sick pay Insurance","value":" Sick pay Insurance","selected":false},{"label":" QuickCover Life Insurance","value":" QuickCover Life Insurance","selected":false}],"id":"Life Product","name":"Your product","label":"Your product","additional":"","info":"If you have more than one product, please complete this form again selecting the other product(s) you have","value":"","customError":"Please tell us which product you would like to update your name for,","isRequired":true,"editButton":""}

I'd really value your assistance please guys!!!

http-transaction-sensor postdata submit

Created on Apr 23, 2020 11:14:31 AM



Best Answer

Accepted Answer

Votes:

0

Dear Barty,

with HTTPS, it is indeed more difficult. If you have the certificate, you can tell Wireshark to use it. You could also setup Fiddler.

As last resort, you could do a different setup: On a computer, run a script which uses mouse or keyboard controls to send that form and read the result, and process it (similar to a macro, or test automation tool) and then post the result to a PRTG sensor.

That could be an HTTP Push Data sensor. Normally, PRTG sensors pull the data, but that sensor waits until gets send to it. (The HTTP Push Data cannot interact with forms itself, it just uses HTTP to receive data sent by an external script.)

Created on Apr 29, 2020 7:44:37 PM by  Arne Seifert [Paessler Support]



9 Replies

Votes:

0

Dear Barty,

an option would be to read the HTTP traffic in order to check what happens when you manually set the radio button and then submit.

Created on Apr 23, 2020 1:59:38 PM by  Arne Seifert [Paessler Support]



Votes:

0

Good morning Arne,

I did wonder about this, would you suggest this is acheivable through Chrome developer options for example? Or as in from the capture log of the sensor result? I'm guessing it would be through the browser tools.

Sadly, I was unable to pin-point it directly you see, but will run again to see if I can spot the declared values!

Created on Apr 27, 2020 7:42:23 AM



Votes:

0

Dear Barty,

I am not sure if you can read the full HTTP traffic with the development tools. Wireshark would be an option in any case. Though if the source is HTTPS, also a tool like Fiddler would be needed (as intentional man-in-the-middle HTTPS de/re-encryption.)

Created on Apr 27, 2020 10:53:45 AM by  Arne Seifert [Paessler Support]



Votes:

1

Well, sadly, I did not manage to crack this as per my previous comment (now editied for this instead)!

The actual the POST submission I can see (from Chrome Developer tools):-

{"id":"Life change address","testSuccess":false,"testFailure":false,"groupData":"{\"Personal details\":{\"Title\":\"Mr\",\"First name\":\"Test_direct\",\"Surname\":\"Tester\",\"Life Product\":\"Life Insurance\",\"Policy number\":\"123456789\",\"Address 1\":\"Test\",\"Address 2\":\"\",\"Address 3\":\"\",\"County\":\"\",\"Post code existing\":\"AB12CD\",\"Telephone number\":\"0123456789\",\"Email address\":\"[email protected]\",\"DOB\":\"1980-01-01\"},\"New details\":{\"New address 1\":\"Test_new\",\"New address 2\":\"\",\"New address 3\":\"\",\"County\":\"\",\"Post code new\":\"cd12AB\",\"New address date\":\"2021-01-01\"}}"}

Now, how on earth would I manage to post that?! And a submit button at the very bottom of the page that I cannot see any option for ?

Created on Apr 27, 2020 11:10:37 AM

Last change on Apr 28, 2020 7:02:57 PM by  Arne Seifert [Paessler Support]



Votes:

0

I'm not sure my edit has been applied, so I am writing a response again.

Sadly, it seems the sensor is not working as hoped. Although it is validating the page, I'm unsure it is applying my post data submission, as we are not seeing a resulting email coming into our central mailbox for the form completion. To confirm, I have captured the post method from Chrome Dev tools to be as follows:-

{"id":"Life change address","testSuccess":false,"testFailure":false,"groupData":"{\"Personal details\":{\"Title\":\"Mr\",\"First name\":\"Test_direct\",\"Surname\":\"Tester\",\"Life Product\":\"Life Insurance\",\"Policy number\":\"123456789\",\"Address 1\":\"Test\",\"Address 2\":\"\",\"Address 3\":\"\",\"County\":\"\",\"Post code existing\":\"AB12CD\",\"Telephone number\":\"0123456789\",\"Email address\":\"[email protected]\",\"DOB\":\"1980-01-01\"},\"New details\":{\"New address 1\":\"Test_new\",\"New address 2\":\"\",\"New address 3\":\"\",\"County\":\"\",\"Post code new\":\"cd12AB\",\"New address date\":\"2021-01-01\"}}"}

However, to 'submit' the form, a user would normally complete the above fields and then select the submit button at the bottom of the page. I am unsure as to how I would invoke that through the postdata options!? I can find the button in the sensor logas follows:-

name="submit">Submit</button>

IF we could get this working, it would be a huge huge help to my organization

Created on Apr 28, 2020 1:53:58 PM



Votes:

0

Dear Barty,

when you manually click that button, does it perform an HTTP POST upon that action?

The sensor cannot operate elements like buttons, it can only use a couple of HTTP methods. If you cannot get all the data with the Chrome dev tools, using Wireshark to read HTTP traffic might be an alternative.

Created on Apr 28, 2020 7:08:27 PM by  Arne Seifert [Paessler Support]



Votes:

0

I think you've hit the nail on the head there - the submit button is then what generates the HTTP POST. However, if you review the post data in developer tools, you can see the submitted data, but the actual button click will remain the manual part.

I have downloaded wireshark, but having spent a little time this morning, it seems to suggest that HHTP post capture is easily reviwed, but if HTTPS (which this is) then it is a much bigger challenge.

This is such a shame, we (as my organisation) would have been blown away by some synthetic monitoring on the forms.

Created on Apr 29, 2020 9:51:15 AM



Accepted Answer

Votes:

0

Dear Barty,

with HTTPS, it is indeed more difficult. If you have the certificate, you can tell Wireshark to use it. You could also setup Fiddler.

As last resort, you could do a different setup: On a computer, run a script which uses mouse or keyboard controls to send that form and read the result, and process it (similar to a macro, or test automation tool) and then post the result to a PRTG sensor.

That could be an HTTP Push Data sensor. Normally, PRTG sensors pull the data, but that sensor waits until gets send to it. (The HTTP Push Data cannot interact with forms itself, it just uses HTTP to receive data sent by an external script.)

Created on Apr 29, 2020 7:44:37 PM by  Arne Seifert [Paessler Support]



Votes:

0

Good morning Arne,

Thank you for all your help on this - I think you're right, I'll likely look at a synthetic recorder and then simply collect the event results from that test via PRTG.

If only we still had the synthetic recorder in PRTG to use! Thanks for your help.

Created on Apr 30, 2020 7:24:47 AM




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.