This isn't a watir question, but the problem is that you don't want to use open, you want to use new. See the documentation here: https://github.com/hmcgowan/roo. Also, don't try to automate against gmail. If you need to check mail there, use the gmail gem.
See this thread for a discussion on that matter : https://groups.google.com/forum/#!searchin/selenium-users/gmail/selenium-users/8jR6Fw5ndxU/GbKzuBNYOGAJ On Monday, August 5, 2013 10:42:30 AM UTC-4, Nikhil Nerkar wrote: > > I want to login to gmail using userid & password from the excel stored on > my machine. > I am getting the error : > > C:/Documents and > Settings/XXXX/Desktop/Watir/Project/TestProject/S10.rb:5:in `<main>': > private method `open' called for Roo::Excelx:Class (NoMethodError) > > *Please advice....* > > > require 'watir' > require 'rubygems' > require 'roo' > > xl = Roo::Excelx.open("C:\Documents and > Settings\XXXX\Desktop\Watir\Project\TestProject\TestExcel.xlsx") > xl.default_sheet = xl.sheets[0] > c1=x1.cell(1,2) > c2=x1.cell(2,2) > > B=Watir::Browser.new > url="http://www.gmail.com" > B.goto(url) > > B.text_field(:id,'Email').set c1 > B.text_field(:id,'Passwd').set 'abc' > B.button(:value,'Sign in').click > > -- -- 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.
