Latest Inquiries - Data Extraction Software

Question about using a project parameter as input to a FormField that is a drop down list

Submitted: 8/30/2017

Hi,

     This is more of a how-do-I-do-this in Visual WebRipper question.  I have a project that involves submitting a Form with a FormField that is a drop-down list.  I have it working either using a fixed value from the list specified at design-time, or all values from the list. 

     What I would like to do is use the value of a project parameter (let's say called 'ChoiceParam') and use the value from the drop down list that matches this project parameter.  The HTML for the SELECT form field and its options is:

<select name="filter[category_id]">
<option value="0">Choice0</option>
<option value="1">Choice1</option>
<option value="2">Choice2</option>
<option value="3">Choice3</option>

     etc...

</select>


     And the (succesful) Xpath is currently

          //SELECT[@name='filter[category_id]']

     So I would like to pass a value to ChoicParam in my project (let's say ChoiceParam = 'Choice1') and have the project run using only 'Choice1' as the value for the form field that it submits to the form.  What is the best way to do this?


     I really like the product and have several projects up and running. 

     Any help you can provide on this question will be appreciated!

     Thank You!

     Alan


Replied: 9/1/2017 10:40:34 PM

With your suggestion of using an Input Transformation and C#/VB script I was able to get it working.

Thank you very much!


Replied: 9/5/2017 8:12:02 AM
You're always welcome!
Replied: 8/31/2017 11:22:33 AM

Hi Alan, 

Glad to know that you like the VWR software. 

Can you attach the project so that we can take a look on it? 

It seems that you can do an Input Transformation on the formfield and use C# to get your input field.

Best regards,