Joel Pearson wrote in post #1095466:
> Love U Ruby wrote in post #1095465:
>> I don't have watir-web driver installed in my PC. Now so I am trying to
>> understand it by logic.
>>
>> name_array= [John,Ram,Smith,Paul] If it really this,then I think my one
>> should also work for me:

Now I tried the code as below against the HTML below:


<div id="filtersetedit_fieldNames" title="Please first select a list to 
filter!"> <input value="5418630" name="NameID" type="checkbox"> John 
Das<input value="6360899" name="NameID" type="checkbox"> Ram Roy <input 
value="9556609" name="NameID" type="checkbox"> Smith<input 
value="20156687" name="NameID" type="checkbox"> Paul </div>


Code:

driver.find_elements(:id,"filtersetedit_fieldNames").each do |x|
puts x.text
#puts index
break if x.text == "LocationAttributes:Currency Type"
index = index + 1
end

driver.find_elements(:name, "candidateFieldIds")[index].click


But it prints some thing like below :

"John Das Ram Roy Smith Paul"

From where I am not able to find the the "John Das" index number to 
check the check box associated with it.

-- 
Posted via http://www.ruby-forum.com/.