Hi Zeljko,
Here is my *html*
<div>
<div class="reg_client_label" style="margin-left: 30px;"> … </div>
<div class="reg_client_ctrl">
<select
id="CPContent_TabContainer1_tab_company_information_ddlIndustry1"
class="il_ddl" style="width:350px;"
onchange="javascript:setTimeout('__doPostBack(\'ctl00$CPContent$TabContainer1$tab_company_information$ddlIndustry1\',\'\')',
0)"
name="ctl00$CPContent$TabContainer1$tab_company_information$ddlIndustry1">
<option value="0"> … </option>
<option value="1"> … </option>
<option value="11" selected="selected">Construction</option>
</select>
</div>
<div style="clear: both;"> … </div>
</div>
<div>
<div class="reg_client_label" style="margin-left: 30px;"> … </div>
<div class="reg_client_ctrl">
<select
id="CPContent_TabContainer1_tab_company_information_ddlIndustry2"
class="il_ddl" style="width:350px;"
onchange="javascript:setTimeout('__doPostBack(\'ctl00$CPContent$TabContainer1$tab_company_information$ddlIndustry2\',\'\')',
0)"
name="ctl00$CPContent$TabContainer1$tab_company_information$ddlIndustry2">
<option value="0"> … </option>
<option value="12"> … </option>
<option value="16" selected="selected">Heavy
Construction</option>
</select>
</div>
<div style="clear: both;"> … </div>
</div>
<div>
<div class="reg_client_label" style="margin-left: 30px;"> … </div>
<div class="reg_client_ctrl">
<select
id="CPContent_TabContainer1_tab_company_information_ddlIndustry3"
class="il_ddl" style="width:350px;"
onchange="javascript:setTimeout('__doPostBack(\'ctl00$CPContent$TabContainer1$tab_company_information$ddlIndustry3\',\'\')',
0)"
name="ctl00$CPContent$TabContainer1$tab_company_information$ddlIndustry3">
<option value="0"> … </option>
<option value="17" selected="selected"> … </option>
<option value="18"> … </option>
</select>
</div>
<div style="clear: both;"> … </div>
</div>
Here is my Ruby Error
Error: test_valid_client(ClientRecord_Create)
Watir::Exception::NoValueFoundException: No option with :text, :label or
:value of "Miscellaneous Heavy Construction" in this select element
On Tuesday, September 10, 2013 6:24:07 AM UTC+8, Željko Filipin wrote:
>
> Please provide HTML that would reproduce the problem or link to the page
> where the problem is reproducible. Also, please provide the Ruby code that
> produces the error.
>
> Željko
> --
> https://leanpub.com/watirbook
>
>
> On Mon, Sep 9, 2013 at 12:16 AM, topgun fifteen
> <[email protected]<javascript:>
> > wrote:
>
>> Hi Everyone,
>>
>> I'm new to watir, and currently having a problem when ajax is present.
>> My Scenario is, I should Select the First Industry before the Second
>> Industry Shows up.
>>
>> Problem is that, it gives me the wrong value. *"Miscellaneous Heavy
>> Construction" *should be on the last Industry and not in the 2nd
>> Industry. Thats why I'm getting this error below right after the Industry 1
>> was selected.
>> *Here is my error message:
>> Watir::Exception::NoValueFoundException: No option with :text,
>> :label or :value of "Miscellaneous Heavy Construction" in this select
>> element*
>> I'm worried that the onchange="javascript:setTimeout( might be the reason
>> why I'm having this.
>>
>> What Is the best approach for this? Should I use the wait_until? or there
>> is another way doing this right?
>> Im using WATIR and data-driven using excel.
>>
>>
>>
>>
>>
>>
>>
>> --
>> --
>> Before posting, please read http://watir.com/support. In short: search
>> before you ask, be nice.
>>
>> [email protected] <javascript:>
>> http://groups.google.com/group/watir-general
>> [email protected] <javascript:>
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Watir General" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
--
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]
---
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.