From: Joel Pearson Date: 2013-02-06T17:53:16+09:00 Subject: Re: Not able get the label text incurred with element 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: > > driver.find_elements(:xpath,"//div[contains(@id,'filtersetedit_fieldNames')]/input").each > do |x| > > puts x.text.strip > > end You've completely missed my point. 1) The DIV, not the Checkbox, contains the Name you want; so each "x.text" will be blank 2) Watir-Webdriver contains Selenium-Webdriver. Switching to it is simple and it was specifically made to make writing browser-automating code easier for you. I see no reason to persist in using the more difficult selenium API when there's a layer already designed to help Rubyists use it more effectively. Use the open-source tools that selfless people have expended great effort to make. See this (especially the illustrative image): http://watirmelon.com/2010/04/10/watir-selenium-webdriver/ 3) Do your own research first! There are several ways to do what you want here, and when you completely fail to take in the information provided, and ask questions which have already been answered, you will find less and less help being offered to you. -- Posted via http://www.ruby-forum.com/.