axefrog/SimpleBrowser — pull request #10 by turnkey-commerce (2012-01-14 02:09:28+00:00)
Title: Fix bug with posting of checkbox when more than one item is selected.

When using SimpleBrowser for SpecFlow headless browser testing, I ran into an error in which a checkbox with multiple values in the same name would post incorrectly. In my HTML I have multiple checkboxes with the same name, two of which are selected, e.g.

Adult DayCare

Affordable Senior Housing

It is posting like this:

BusinessCategoriesSelection=1%2c2

When it should be posting like this:

BusinessCategoriesSelection=1&BusinessCategoriesSelection=2

The problem is with the "MakeQueryString()" method in the "StringUtil" class was not considering multiple values with the same name properly and it was emitting a CSV list rather than the proper way of posting as multiple name=value in the post parameters. This change fixes that by adding a foreach loop for multiple values inside the key loop.