Using sleeps is a bad idea. There's plenty of wait methods available that do a much better job. See here http://watirwebdriver.com/waiting/.
On Friday, March 21, 2014 5:10:08 AM UTC-4, [email protected] wrote: > > Hi, > > add --> sleep 10 after > > browser.element(:class, 'loginTwitter').click > > I hope it will solve your problem > > > On Wed, Mar 19, 2014 at 11:36 PM, Oscar Rieken <[email protected]<javascript:> > > wrote: > >> http://watirwebdriver.com/browser-popups/ >> >> >> On Wed, Mar 19, 2014 at 1:57 PM, Elad Shalom <[email protected]<javascript:> >> > wrote: >> >>> Thanks, for your help. I was told to quit that one and do a different >>> POC. >>> Should be very simple, but again - doesn't work. >>> >>> This should login to a website with Twitter. >>> >>> browser = Watir::Browser.start 'http://www.12mass.com/' >>> browser.link(:class, 'priceLogin').click >>> sleep 2 >>> browser.element(:class, 'loginTwitter').click >>> browser.window.last.use do >>> browser.text_field(:id, 'username_or_email').set 'name' >>> browser.text_field(:id, 'password').set 'pass' >>> >>> browser.button(:id, 'allow').click >>> end >>> >>> >>> I get to a point where a new window opens, but I can't reach it and fill >>> the credentials... >>> >>> -- >>> -- >>> 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/d/optout. >>> >> >> -- >> -- >> 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/d/optout. >> > > > > -- > Regards, > P.Raveendran > http://raveendran.wordpress.com > -- -- 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/d/optout.
