From: Love U Ruby Date: 2013-02-06T21:53:55+09:00 Subject: Re: Not able get the label text incurred with element 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:
John Das Ram Roy Smith Paul
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/.