On Monday, August 5, 2013 9:24:22 AM UTC-7, Oscar.Rieken wrote: > > 1. Don't try to automate against gmail there a bunch of posts explaining > why. I'll just say it changes a lot. you never really know what you are > getting. > 2. Opening an Excel document has nothing to do with watir. > > for the roo problem I would suspect their mailing list would be a better > place to ask the question. >
See here for a basic readme on using roo http://roo.rubyforge.org/ It looks like you are using an older syntax, perhaps from an example that needs to be updated. the new syntaxt is mysheet = Excel.new(filename) For more help than that, see a roo forum/group as Oscar suggests. Oscar's point about not automating against the gmail UI is right on. Unless you are working for Google and trying to do automated testing of gmail itself, there is not much point to doing things that way. Google has API's defined in multiple languages (see https://code.google.com/p/google-api-ruby-client/ for an example using ruby) so they make zero effort to have the UI be 'friendly' to anyone doing automation, and in fact at times I think it's intentionally hostile. If your test code needs to access the email (to see if an email was sent, etc) I'd either use the google API's, or an IMAP or POP3 library to access the mail. The latter would likely be superior as they are more 'standard' interfaces and less likely to change, and also would work with services other than gmail if that becomes necessary. > > > On Mon, Aug 5, 2013 at 10:42 AM, Nikhil Nerkar > <[email protected]<javascript:> > > 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] <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.
