Jump to content


Getting Value from .Net control


  • Please log in to reply
3 replies to this topic

#1 Guest_JohnE_*

Guest_JohnE_*
  • Guests

Posted 03 February 2009 - 01:25 PM

Hi new user her, and have figured out many bits but am having trouble getting a value out of a control. The test I am attempting to get right is adding items into a trolly and then to remove one or more of them. shown below is a snippet of the page I am trying to get the values out of and into a parameter.

.....
<input name="ctl00$ContentPlaceHolder1$ShoppingTrolley1$hidTrolleyAction" type="hidden" id="ctl00_ContentPlaceHolder1_ShoppingTrolley1_hidTrolleyAction" />
<table style="MARGIN-TOP: 5px" cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr valign="middle">
<td class="colTableHeader" style="padding-left:10px">
<DIV id="ctl00_ContentPlaceHolder1_ShoppingTrolley1_lblErr"></DIV>
<p class="textLrgLight"><b>Shopping Trolley</b></p>
</td>
</tr>
<tr valign="middle">
<td class="col2a" style="width:100%">
<table cellspacing="0" cellpadding="2" border="0" style="width:100%">
<tr valign="top">
<td style="width:100%">
<select name="ctl00$ContentPlaceHolder1$ShoppingTrolley1$shoppingTrolleySelect" id="ctl00_ContentPlaceHolder1_ShoppingTrolley1_shoppingTrolleySelect" class="formShoppingTrolley" style="width:100%" size="6">
<option selected="selected" value="10145961">lotto Draw 259 $30.00</option>
<option value="10145962">lotto Draw 259 $10.80</option>
<option value="10145963">lotto Draw 259 $7.20</option>
<option value="">______________________________________________</option>
<option value="">Total $48.00</option>
</select>
......

I want to be able to delete the top entry in the trolly. And need to get the value from "<option selected="selected" value="10145961">lotto Draw 259 $30.00</option>" I've tried several of the options and think that the $search function may do it but I cannot figure out the syntax.

Is the $search function the one I need, if so what would the syntax be to get out any one of the values?
If $search is not the one what would be the one I need?


many thanks,


regards John.

(Trying to put together a presentation of the product to the other support and dev teams on Thursday)

#2 Guest_angela_*

Guest_angela_*
  • Guests

Posted 04 February 2009 - 10:53 AM

Hi John,

You need to use the function Search. As a left boundary specify: <option selected="selected" value="
as the right one: ">

In this way you will be able to get the required value.

#3 Guest_JohnE_*

Guest_JohnE_*
  • Guests

Posted 04 February 2009 - 01:23 PM

QUOTE (angela @ Feb 4 2009, 08:53 PM) <{POST_SNAPBACK}>
Hi John,

You need to use the function Search. As a left boundary specify: <option selected="selected" value="
as the right one: ">

In this way you will be able to get the required value.



Sorry no luck sill doesn't seem to pick up the value.

#4 Guest_angela_*

Guest_angela_*
  • Guests

Posted 04 February 2009 - 01:25 PM

QUOTE (JohnE @ Feb 4 2009, 07:23 PM) <{POST_SNAPBACK}>
Sorry no luck sill doesn't seem to pick up the value.


So we will need the Full and Error logs by WAPT, Profile and Scenario. Please send them to support @loadtestingtool.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users