[wtr-general] Re: browser.attach
On Wed, Jan 21, 2009 at 01:27:07PM -0800, Mikalyo wrote: > > Actually, it does work, but the syntax is kinda funny. > > You can't simply write: Watir::IE.attach(:title, //) > You must specify by: ie = Watir::IE.attach(:title, //) I think there's some confusion about the syntax here. As far as attach() is concerned, both lines are exactly the same. If it fails in the first line, it should also fail in the second; if it succeeds in the first line, it should also succeed in the second. The difference lies in the fact that calling Watir::IE.attach only produces a reference to the new window. You have to save this reference somewhere if you want to use it later. So the first line is throwing away the reference produced by the (successful) attach, while the second is storing it in the variable called ie. You can also store it under another name: popup = Watir::IE.attach(:title, /blahblah/) Which will allow you to call the usual Watir methods on it: popup.text_field(:name, 'q').flash (etc.) > Then it will attach. You must use ie = or whatever browser you are > using first, eventhough IE is already specified in the syntax. If you stored the reference to the main window in ie, doing this will overwrite it. That may cause some problems later on with code that wants to work with the main window again. Unless you're sure that you won't be needing the main window again, it's better to use another variable (see above). HTH, Anna --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: browser.attach
Actually, it does work, but the syntax is kinda funny. You can't simply write: Watir::IE.attach(:title, //) You must specify by: ie = Watir::IE.attach(:title, //) Then it will attach. You must use ie = or whatever browser you are using first, eventhough IE is already specified in the syntax. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: browser.attach
Aidey Lewis - I have also found that Watir::IE.attach does not attach to my popups anymore. I don't know why, but it used to work on watir-1.4.1. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: browser.attach
Watir::Browser.attach is not supported/included in 1.6.2. (although it mostly works in trunk) Watir::IE.attach continues to work as ever. Bret aidy lewis wrote: > Hi Bret, > > 2008/12/4 Bret Pettichord <[EMAIL PROTECTED]>: > >> Where do you see that it is not supported? >> >> > > http://wiki.seleniumhq.org/display/WTR/Browser.new > > "Compatibility > Watir 1.6.2 does not support Browser.attach. This will be supported in > a future version" > > Aidy > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: browser.attach
Hi Bret, 2008/12/4 Bret Pettichord <[EMAIL PROTECTED]>: > > Where do you see that it is not supported? > http://wiki.seleniumhq.org/display/WTR/Browser.new "Compatibility Watir 1.6.2 does not support Browser.attach. This will be supported in a future version" Aidy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: browser.attach
I've been using 1.6.2 and I use this browser.attache method with know problems. On Dec 4, 1:46 pm, Bret Pettichord <[EMAIL PROTECTED]> wrote: > Where do you see that it is not supported? > > > > aidy lewis wrote: > > Hi, > > > On the wiki I am informed that the browser.attach method is not > > supported in 1.6.2 > > > What alternative method can I use to hook onto an existing browser? > > > Aidy- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: browser.attach
Where do you see that it is not supported? aidy lewis wrote: > Hi, > > On the wiki I am informed that the browser.attach method is not > supported in 1.6.2 > > What alternative method can I use to hook onto an existing browser? > > Aidy > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---