[wtr-general] Need to find text of an element using watir
Hi, I want to get text of an element on the page.I tried using .text but it works only for selection box. Can anyone tell me some method which I can use to find text of an element on the page. --~--~-~--~~~---~--~~ 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] need to access select_list with in a popup
Hi All, i need to access a select_list with in a popup. here i need to select required item and then click OK button on the popup. Any ideas? Thanks in advance Sumanth --~--~-~--~~~---~--~~ 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] OLE
Hi Guys, I want to create a method by which I can perform any operation on a object by just passing the identifier of that object. In Watir , we need to call specific methods for calling a particular object as-- ie.text_filed(:id, 'Text1').set('Test') So, Can I impelment my method using win32OLE . e.g. -- require 'win32ole' ie = WIN32OLE.new('InternetExplorer.Application') ie.visible = true ie.navigate(http://www.google.com;) ie.document.all[q].value = pickaxe ie.document.all[btnG].click Is this a good way to create a function which performs an operation on all object types by just passing identifier as -- def click(sObjectId) ie.document.all[sObjectId].click end Please reply. I will be thankful for your cooperation. Thanks Vikas --~--~-~--~~~---~--~~ 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: OLE
I have tried this code but it gives error for document function. as-- LE.rb:7:in `method_missing': Document (WIN32OLERuntimeError) OLE error code:80004005 in Unknown No Description HRESULT error code:0x80020009 Exception occurred. from OLE.rb:7 Exit code: 1 On Mar 26, 11:35 am, Vikas Tulashyam vtulash...@gmail.com wrote: Hi Guys, I want to create a method by which I can perform any operation on a object by just passing the identifier of that object. In Watir , we need to call specific methods for calling a particular object as-- ie.text_filed(:id, 'Text1').set('Test') So, Can I impelment my method using win32OLE . e.g. -- require 'win32ole' ie = WIN32OLE.new('InternetExplorer.Application') ie.visible = true ie.navigate(http://www.google.com;) ie.document.all[q].value = pickaxe ie.document.all[btnG].click Is this a good way to create a function which performs an operation on all object types by just passing identifier as -- def click(sObjectId) ie.document.all[sObjectId].click end Please reply. I will be thankful for your cooperation. Thanks Vikas --~--~-~--~~~---~--~~ 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: OLE
ie.document is method of watir and not OLE Object of IE. You need to study more about IE ole object if you want to do that. - Angrez On Thu, Mar 26, 2009 at 12:07 PM, Vikas Tulashyam vtulash...@gmail.comwrote: I have tried this code but it gives error for document function. as-- LE.rb:7:in `method_missing': Document (WIN32OLERuntimeError) OLE error code:80004005 in Unknown No Description HRESULT error code:0x80020009 Exception occurred. from OLE.rb:7 Exit code: 1 On Mar 26, 11:35 am, Vikas Tulashyam vtulash...@gmail.com wrote: Hi Guys, I want to create a method by which I can perform any operation on a object by just passing the identifier of that object. In Watir , we need to call specific methods for calling a particular object as-- ie.text_filed(:id, 'Text1').set('Test') So, Can I impelment my method using win32OLE . e.g. -- require 'win32ole' ie = WIN32OLE.new('InternetExplorer.Application') ie.visible = true ie.navigate(http://www.google.com;) ie.document.all[q].value = pickaxe ie.document.all[btnG].click Is this a good way to create a function which performs an operation on all object types by just passing identifier as -- def click(sObjectId) ie.document.all[sObjectId].click end Please reply. I will be thankful for your cooperation. Thanks Vikas --~--~-~--~~~---~--~~ 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: OLE
Hi Thanks for the reply. Can you please give me some where I can find the details. Actually I found this code on --http://www.kohl.ca/blog/archives/ 40.html Please guide me. Thanks Vikas On Mar 26, 12:07 pm, Angrez Singh ang...@gmail.com wrote: ie.document is method of watir and not OLE Object of IE. You need to study more about IE ole object if you want to do that. - Angrez On Thu, Mar 26, 2009 at 12:07 PM, Vikas Tulashyam vtulash...@gmail.comwrote: I have tried this code but it gives error for document function. as-- LE.rb:7:in `method_missing': Document (WIN32OLERuntimeError) OLE error code:80004005 in Unknown No Description HRESULT error code:0x80020009 Exception occurred. from OLE.rb:7 Exit code: 1 On Mar 26, 11:35 am, Vikas Tulashyam vtulash...@gmail.com wrote: Hi Guys, I want to create a method by which I can perform any operation on a object by just passing the identifier of that object. In Watir , we need to call specific methods for calling a particular object as-- ie.text_filed(:id, 'Text1').set('Test') So, Can I impelment my method using win32OLE . e.g. -- require 'win32ole' ie = WIN32OLE.new('InternetExplorer.Application') ie.visible = true ie.navigate(http://www.google.com;) ie.document.all[q].value = pickaxe ie.document.all[btnG].click Is this a good way to create a function which performs an operation on all object types by just passing identifier as -- def click(sObjectId) ie.document.all[sObjectId].click end Please reply. I will be thankful for your cooperation. Thanks Vikas --~--~-~--~~~---~--~~ 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: OLE
If you do google search for Internet Explorer Object you'll find this link http://msdn.microsoft.com/en-us/library/aa752084(VS.85).aspx - Angrez On Thu, Mar 26, 2009 at 1:01 PM, Vikas Tulashyam vtulash...@gmail.comwrote: Hi Thanks for the reply. Can you please give me some where I can find the details. Actually I found this code on --http://www.kohl.ca/blog/archives/ 40.html http://www.kohl.ca/blog/archives/%0A40.html Please guide me. Thanks Vikas On Mar 26, 12:07 pm, Angrez Singh ang...@gmail.com wrote: ie.document is method of watir and not OLE Object of IE. You need to study more about IE ole object if you want to do that. - Angrez On Thu, Mar 26, 2009 at 12:07 PM, Vikas Tulashyam vtulash...@gmail.com wrote: I have tried this code but it gives error for document function. as-- LE.rb:7:in `method_missing': Document (WIN32OLERuntimeError) OLE error code:80004005 in Unknown No Description HRESULT error code:0x80020009 Exception occurred. from OLE.rb:7 Exit code: 1 On Mar 26, 11:35 am, Vikas Tulashyam vtulash...@gmail.com wrote: Hi Guys, I want to create a method by which I can perform any operation on a object by just passing the identifier of that object. In Watir , we need to call specific methods for calling a particular object as-- ie.text_filed(:id, 'Text1').set('Test') So, Can I impelment my method using win32OLE . e.g. -- require 'win32ole' ie = WIN32OLE.new('InternetExplorer.Application') ie.visible = true ie.navigate(http://www.google.com;) ie.document.all[q].value = pickaxe ie.document.all[btnG].click Is this a good way to create a function which performs an operation on all object types by just passing identifier as -- def click(sObjectId) ie.document.all[sObjectId].click end Please reply. I will be thankful for your cooperation. Thanks Vikas --~--~-~--~~~---~--~~ 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: using a logger with watir loses formatting
I've worked around this and am using log4r which is working just fine for me Thanks Wadud -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Bret Pettichord Sent: 25 March 2009 23:44 To: watir-general@googlegroups.com Subject: [wtr-general] Re: using a logger with watir loses formatting Watir uses activesupport and i think this modifies the logger. Or maybe its another gem that Watir uses. Not sure really, but i think it's something like that. Bret Ruf, Wadud wrote: Marekj, You describe the exact same scenario as what I am experiencing. I've still not found out why it's doing it. As it's not my core domain I will look into using the Logging gem. Thanks for the tip Wadud * From: * watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] *On Behalf Of *marekj *Sent:* 24 March 2009 22:02 *To:* watir-general@googlegroups.com *Subject:* [wtr-general] Re: using a logger with watir loses formatting I've seen something similar when I moved my test machines from 1.5.3 to 1.6.2 gem. My custom logger has stopped generating timestamps and severity and only outputted messages. My custom Logger class methods were not executed. Logger class from somewhere else was receiving my calls. I've also moved to Logging gem as part of my move to 1.6.2 Watir and I never figured out this problem. P.S. Logging gem works great for me with Watir. I like the simple appenders so I can output to different files and to stdout as well. marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Tue, Mar 24, 2009 at 12:29 PM, Ruf, Wadud wadud@capgemini.com mailto:wadud@capgemini.com wrote: Hi, I am using a logger to log statements to a file when running watir scripts. The logger has a format specified. However I am experiencing irregular behaviour when I for example call Watir::Simple#new_browser_at() where it loses the format and just outputs the statement. All other statements after this seem to lose the formatting too. Example steps are log = Logger.new(logfile.log) log.debug(Starting my watir test) = [01-01-2009 10:23:23] [INFO] - Starting my watir test # As expected b = Watir::Simple.new() log.debug(opening browser) = [01-01-2009 10:23:24] [INFO] - opening browser # As expected b.new_browser_at(http://google.com;) # browser takes a few seconds to fire up. log.debug(browser open at google.com http://google.com) = browser open at google.com http://google.com # Loses formatting from here onwards My code wraps these calls up in other methods but not doing anything else. Any ideas why the formatting is lost? It seems it happens when it waits for the browser to fire up. Thanks Wadud Capgemini is a trading name used by the Capgemini Group of companies which includes Capgemini UK plc, a company registered in England and Wales (number 943935) whose registered office is at No. 1 Forge End, Woking, Surrey, GU21 6DB This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. -- Bret Pettichord CTO, WatirCraft LLC, www.watircraft.com Lead Developer, Watir, www.watir.com Blog, www.io.com/~wazmo/blog Twitter, www.twitter.com/bpettichord Watir Training: Portland/Beaverton April 16-17 www.watircraft.com/training This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. --~--~-~--~~~---~--~~ 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:
[wtr-general] Re: Advice on finding/clicking an image element
On Thu, Mar 26, 2009 at 09:34, Isabel joybe...@gmail.com wrote: I tried using multiple attributes (the src and the id) for the image i wanted to click on, but it gave an error that could not find object, though when these attributes used individually the image gets clicked. Share your html and watir code and we could tell you more. Željko --~--~-~--~~~---~--~~ 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: OLE
On Thu, Mar 26, 2009 at 07:35, Vikas Tulashyam vtulash...@gmail.com wrote: I want to create a method by which I can perform any operation on a object by just passing the identifier of that object. There is already a jira ticket for that, but it is not done yet: http://jira.openqa.org/browse/WTR-103 Vote for it and it will get higher on list of things to do. In the meantime, you can use xpath: http://wiki.openqa.org/display/WTR/XPath Something like: ie.element_by_xpath(//area[contains(@href , 'PieChart.html')]/).click Željko --~--~-~--~~~---~--~~ 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] Need to remove one selection from the set of selected options
Hi, I want to remove one selection from the set of selected options in a multi-select element. I tried using clearSelection() method but it clears all the selected options.Can anyone help on this? --~--~-~--~~~---~--~~ 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: Need to find text of an element using watir
I want to find text of all the elements on the page. (button,checkbox,selectionbox,textfield,labels,titles etc) Is there any common method? On Mar 26, 2:53 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Mar 26, 2009 at 05:32, aditi aditi_...@yahoo.com wrote: I want to find text of an element on the page using watir. Could you tell us the name of the element? And some html would be great too. Also, take a look at this: http://wiki.openqa.org/display/WTR/Tutorial Željko --~--~-~--~~~---~--~~ 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: Need to find text of an element using watir
On Thu, Mar 26, 2009 at 11:05, aditi aditi_...@yahoo.com wrote: Is there any common method? browser.show_all_objects Željko --~--~-~--~~~---~--~~ 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: Need to remove one selection from the set of selected options
On Thu, Mar 26, 2009 at 11:03, aditi aditi_...@yahoo.com wrote: I want to remove one selection from the set of selected options in a multi-select element. What happens if you select the item again. Does it get unselected? I thought clear would clear one option, but looks like it clears them all. http://wtr.rubyforge.org/rdoc/classes/Watir/SelectList.html#M000425 Something like this could be useful: browser.select_list(how, what).clear(option) Add it to Jira if you would like to see it implemented: http://jira.openqa.org/browse/WTR Željko --~--~-~--~~~---~--~~ 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: need to access select_list with in a popup
thanks for the reply Zeljko. the link you sent deals with general issues of dismissing popups. But here this is a different issue where i have a select list with in a popup from which i need to select one item and then click OK. On Mar 26, 2:56 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Mar 26, 2009 at 07:33, sumanth anansumanthku...@gmail.com wrote: i need to access a select_list with in a popup. Take a look at this: http://wiki.openqa.org/display/WTR/Pop+Ups Also, if you send us the link to the page you are testing, or it's html, that would be nice. Željko --~--~-~--~~~---~--~~ 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: need to access select_list with in a popup
for example the dialog box when we try to do RDP from windows box has a select list containing set of different ip's of previously accessed machines. we need to select one of them then try to click Connect. On Mar 26, 2:56 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Mar 26, 2009 at 07:33, sumanth anansumanthku...@gmail.com wrote: i need to access a select_list with in a popup. Take a look at this: http://wiki.openqa.org/display/WTR/Pop+Ups Also, if you send us the link to the page you are testing, or it's html, that would be nice. Željko --~--~-~--~~~---~--~~ 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: need to access select_list with in a popup
For web application you can do like this: ie.select_list(:id, 'list_id).option(:id, option_id).select ie.button(:id, ok_button_id).click - Angrez On Thu, Mar 26, 2009 at 4:03 PM, sumanth anansumanthku...@gmail.com wrote: for example the dialog box when we try to do RDP from windows box has a select list containing set of different ip's of previously accessed machines. we need to select one of them then try to click Connect. On Mar 26, 2:56 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Mar 26, 2009 at 07:33, sumanth anansumanthku...@gmail.com wrote: i need to access a select_list with in a popup. Take a look at this: http://wiki.openqa.org/display/WTR/Pop+Ups Also, if you send us the link to the page you are testing, or it's html, that would be nice. Željko --~--~-~--~~~---~--~~ 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: 'click_no_wait' command in Firewatir
Bret, Do we need to implement this in FireWatir? I looked through the code in Watir basically it spawns a new process click the button in that process? I think the basic reason to do this is that if javascript pop up comes we can handle that. Correct? There is a way to do that in FireWatir. This will un-neccessarily increase the complexity of handling pop ups (which already is complex :) ) - Angrez On Wed, Mar 25, 2009 at 8:41 PM, Vijay vaidyalinga...@gmail.com wrote: Bret, Thanks for the information. Have posted an issue at the link below: http://code.google.com/p/firewatir/issues/list Vijay On Mar 24, 7:49 pm, Bret Pettichord b...@pettichord.com wrote: Right. click_no_wait is not implemented in FireWatir. I'm not sure if this is already logged in Jira. If not, it should be added. Bret Vijay wrote: Hello people, In yhe following code, require 'watir' Watir::Browser.default = 'firefox' $browser = Watir::Browser.new $browser.goto('www.google.com') $browser.maximize $browser.text_field(:name,'q').set('random') $browser.button(:name,'btnG').click_no_wait the command, '$browser.button(:name,'btnG').click_no_wait' does not click the 'Search' button. However, the command, '$browser.button (:name,'btnG').click', clicks the 'Search' button. Am I doing something wrong here or is there a known issue about the 'click_no_wait' command in firewatir? Thanks for your time, Vijay. -- Bret Pettichord CTO, WatirCraft LLC,www.watircraft.com Lead Developer, Watir,www.watir.com Blog,www.io.com/~wazmo/blog http://www.io.com/%7Ewazmo/blog Twitter,www.twitter.com/bpettichord Watir Training: Austin March 25-26, Portland/Beaverton April 16-17www.watircraft.com/training- 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: unknown property or method `navigate' HRESULT error code:0x800706ba The RPC server is unavailable.
On Thu, Mar 26, 2009 at 06:36, Alister Scott alister.sc...@gmail.com wrote: The RPC server is unavailable. If my memory servers me, I think there is an old problem that would cause such error message when opening and closing IE a lot. Are you using the same browser every time, or are you opening and closing IE after each test? Željko --~--~-~--~~~---~--~~ 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: need to access select_list with in a popup
On Thu, Mar 26, 2009 at 07:33, sumanth anansumanthku...@gmail.com wrote: i need to access a select_list with in a popup. Take a look at this: http://wiki.openqa.org/display/WTR/Pop+Ups Also, if you send us the link to the page you are testing, or it's html, that would be nice. Željko --~--~-~--~~~---~--~~ 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: How to catpture the test result
Here is what I get when I cut/paste it into a file, about.rb, and ran ruby about.rb. [~] $ ruby about.rb Loaded suite about Started . Finished in 7.985 seconds. 1 tests, 1 assertions, 0 failures, 0 errors Thanks, Al Snow Agile Software Developer Linkedin: http://www.linkedin.com/in/alsnow Google Talk: jasnow1 Twitter: jasnow Date: Wed, 25 Mar 2009 23:00:15 -0700 Subject: [wtr-general] How to catpture the test result From: durgeshnadka...@gmail.com To: watir-general@googlegroups.com Hi, I have installed the ruby 1.8.6 and WATIR 1.6.2. Then I have created a simple to start with. Following is the code of that script. require 'test/unit' require 'watir' class GoogleHomePage Test::Unit::TestCase def test_there_should_be_text_About_Google browser = Watir::IE.start http://www.google.com; assert(browser.pageContainsText(About Google)) end end The above code opens the site but it stops at that point. How can I determine whether my test has passed or fail? Where are the results normally gets stored? Thanks Regards Durgesh. _ Quick access to Windows Live and your favorite MSN content with Internet Explorer 8. http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0701A --~--~-~--~~~---~--~~ 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: need to access select_list with in a popup
I got that code from unit-tests, so think it is there :) - Angrez On Thu, Mar 26, 2009 at 4:11 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Mar 26, 2009 at 11:38, Angrez Singh ang...@gmail.com wrote: ie.select_list(:id, 'list_id).option(:id, option_id).select This is implemented (option(how, what))? I did not know that. So cool. Željko --~--~-~--~~~---~--~~ 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: need to access select_list with in a popup
On Thu, Mar 26, 2009 at 12:20, Angrez Singh ang...@gmail.com wrote: I got that code from unit-tests, so think it is there :) A few days ago I was thinking how something like that would be nice: http://twitter.com/zeljkofilipin/status/1336645413 Looks like Watir Santa exists, after all. :) Željko --~--~-~--~~~---~--~~ 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: Packaging 3rd party tool
Hi Guys, Please reply, this is possible or not? Thanks Vikas On Mar 26, 9:27 am, Vikas Tulashyam vtulash...@gmail.com wrote: Hi Friends, I want to bundle a 3rd party tool with my Watir framework e.g. some Java based tool. So is it possible in Watir? Thanks in Advance Vikas --~--~-~--~~~---~--~~ 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: 'click_no_wait' command in Firewatir
The purpose of click_no_wait is to support the following logic flow. 1. click button 2. handle popup This was particularly important with the showModalDialogs, but these, of course, only work with IE. Previously you had to do this. 1. start popup handler 2. click button This inverted logic was confusing to some. But what we really need is a browser/platform independent way of handling popup dialogs. Bret Angrez Singh wrote: Bret, Do we need to implement this in FireWatir? I looked through the code in Watir basically it spawns a new process click the button in that process? I think the basic reason to do this is that if javascript pop up comes we can handle that. Correct? There is a way to do that in FireWatir. This will un-neccessarily increase the complexity of handling pop ups (which already is complex :) ) - Angrez On Wed, Mar 25, 2009 at 8:41 PM, Vijay vaidyalinga...@gmail.com mailto:vaidyalinga...@gmail.com wrote: Bret, Thanks for the information. Have posted an issue at the link below: http://code.google.com/p/firewatir/issues/list Vijay On Mar 24, 7:49 pm, Bret Pettichord b...@pettichord.com mailto:b...@pettichord.com wrote: Right. click_no_wait is not implemented in FireWatir. I'm not sure if this is already logged in Jira. If not, it should be added. Bret Vijay wrote: Hello people, In yhe following code, require 'watir' Watir::Browser.default = 'firefox' $browser = Watir::Browser.new $browser.goto('www.google.com http://www.google.com') $browser.maximize $browser.text_field(:name,'q').set('random') $browser.button(:name,'btnG').click_no_wait the command, '$browser.button(:name,'btnG').click_no_wait' does not click the 'Search' button. However, the command, '$browser.button (:name,'btnG').click', clicks the 'Search' button. Am I doing something wrong here or is there a known issue about the 'click_no_wait' command in firewatir? Thanks for your time, Vijay. -- Bret Pettichord CTO, WatirCraft LLC,www.watircraft.com http://www.watircraft.com Lead Developer, Watir,www.watir.com http://www.watir.com Blog,www.io.com/~wazmo/blog http://www.io.com/%7Ewazmo/blog Twitter,www.twitter.com/bpettichord http://www.twitter.com/bpettichord Watir Training: Austin March 25-26, Portland/Beaverton April 16-17www.watircraft.com/training- http://16-17www.watircraft.com/training- Hide quoted text - - Show quoted text - -- Bret Pettichord CTO, WatirCraft LLC, www.watircraft.com Lead Developer, Watir, www.watir.com Blog, www.io.com/~wazmo/blog Twitter, www.twitter.com/bpettichord Watir Training: Portland/Beaverton April 16-17 www.watircraft.com/training --~--~-~--~~~---~--~~ 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: Packaging 3rd party tool
On Thu, Mar 26, 2009 at 15:05, Vikas Tulashyam vtulash...@gmail.com wrote: Please reply, this is possible or not? In my experience, when you do not get a reply, that means you should be more specific. :) For example, I just did not understand the problem. You could bundle what every you like with your framework. In my example, I have a custom framework, I bundle snapit.exe that takes screens shots and I have no problems with that. What Java tool did you have in mind, and why do you think there will be a problem? Željko --~--~-~--~~~---~--~~ 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] FireWatir sometimes fails when Firefox takes time to load
I've noticed that my tests will fail sometimes because Firefox takes too long to load. For example, I just went to launch a test for the first time this day, and I received this error: 1) Error: test_08_visiting_direct_links_goes_to_login (TC_EWWC_StandardBasics_Login_FireFox): Watir::Exception::UnableToStartJSShException: Unable to connect to machine : 127.0.0.1 on port 9997. Make sure that JSSh is properly installed and Firefox is running with '-jssh' option C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ firefox.rb:271:in `set_defaults' C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ firefox.rb:161:in `initialize' C:/Ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/ browser.rb:65:in `new' C:/Ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/ browser.rb:65:in `new' ewwc-standardbasics-login.rb:16:in `setup' 2) Error: test_08_visiting_direct_links_goes_to_login (TC_EWWC_StandardBasics_Login_FireFox): NoMethodError: undefined method `close' for nil:NilClass ewwc-standardbasics-login.rb:23:in `teardown' Other times, I get that nil:NilClass error if the browser somehow doesn't respond. This is especially a problem if Firefox has to run an update check, although I can just turn that off in the Firefox options. Has anyone else seen this? --~--~-~--~~~---~--~~ 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: need to access select_list with in a popup
i can not this popup using ie.attach ( so not a new browser window). its a dialog box. i can able to access the window using Autoit.winwait (title of window) but after that i am stuck with accessing the select_list in that box. i can send the keys to that box using send_keys but i want to select an item through text. On Mar 26, 4:26 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Mar 26, 2009 at 12:20, Angrez Singh ang...@gmail.com wrote: I got that code from unit-tests, so think it is there :) A few days ago I was thinking how something like that would be nice: http://twitter.com/zeljkofilipin/status/1336645413 Looks like Watir Santa exists, after all. :) Željko --~--~-~--~~~---~--~~ 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: need to access select_list with in a popup
On Thu, Mar 26, 2009 at 15:38, sumanth anansumanthku...@gmail.com wrote: its a dialog box. To make this shorter, can you send us the screen shot or anything that would help us find out what kind of pop up beast are you dealing with? Željko --~--~-~--~~~---~--~~ 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] Browser.url does not return proper URL immediately after a browser.goto statement
I'm trying to test that a web application always redirects back to a login page if you try to go to one of the application's pages when you're not logged in. First, I do: browser.goto(http://www.pagethatredirects.com;) Then, I look at the contents of @browser.url and I get about: blank, which is what my firefox install opens up to. From what I've read, Watir/firewatir should be waiting until the page is loaded before executing the browser.url statement. I'm basing that on: http://wiki.openqa.org/display/WTR/How+to+wait+with+Watir However, that isn't really working the way I expect. Should I be using wait_until? --~--~-~--~~~---~--~~ 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.url does not return proper URL immediately after a browser.goto statement
Let me comment on my own post with an example. I might be having a Ruby problem and not a Watir problem. Here is what I am trying to do: require 'watir' Watir::Browser.default = 'firefox' browser = Watir::Browser.new sites = %w(www.google.com www.yahoo.com www.microsoft.com) sites.each do |url| puts going to website: #{url} browser.goto(url) puts Browser went to: #{browser.url} end On Mar 26, 10:46 am, Kevin White ilium...@gmail.com wrote: I'm trying to test that a web application always redirects back to a login page if you try to go to one of the application's pages when you're not logged in. First, I do: browser.goto(http://www.pagethatredirects.com;) Then, I look at the contents of @browser.url and I get about: blank, which is what my firefox install opens up to. From what I've read, Watir/firewatir should be waiting until the page is loaded before executing the browser.url statement. I'm basing that on:http://wiki.openqa.org/display/WTR/How+to+wait+with+Watir However, that isn't really working the way I expect. Should I be using wait_until? --~--~-~--~~~---~--~~ 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: Obect not found to Firewatir
Can you provide part of your script and html source where the object found? - Original Message From: KiranD kir...@sikkasoft.com To: watir-general@googlegroups.com Sent: Wednesday, March 25, 2009 9:19:10 PM Subject: [wtr-general] Re: Obect not found to Firewatir Yes, I was there. I also used sleep command. But not worked. Regards, Kirand -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Bret Pettichord Sent: Thursday, March 26, 2009 5:26 AM To: watir-general@googlegroups.com Subject: [wtr-general] Re: Obect not found to Firewatir Could be a timing issue. Are you sure that the object exists on the page at the very moment that this code is being executed? Bret KiranD wrote: Hi, My script is running on IE without an error. I am trying to run same script using firewater. But it is showing an error c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/MozillaBaseElem ent.rb:967:in `assert_exists': Unable to locate element, using :id, ctl00_ContentPlaceHolder1_GridView1_ctl04_Image4 (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/MozillaBaseElem ent.rb:1112:in `click' I checked source code, that object is exists in code. Why this is happening ? pls help.. Regards, Kirand -- Bret Pettichord CTO, WatirCraft LLC, www.watircraft.com Lead Developer, Watir, www.watir.com Blog, www.io.com/~wazmo/blog Twitter, www.twitter.com/bpettichord Watir Training: Portland/Beaverton April 16-17 www.watircraft.com/training --~--~-~--~~~---~--~~ 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.url does not return proper URL immediately after a browser.goto statement
Yep, that was exactly it! I ended up getting a debugger going and found out that my strings had double quotes. I must've misread something when looking up how to do this... Thanks! --Kevin On Mar 26, 11:55 am, George george.sand...@gmail.com wrote: This worked for me: require 'watir' Watir::Browser.default = 'firefox' browser = Watir::Browser.new sites = %w{www.google.comwww.yahoo.comwww.microsoft.com} sites.each do |url| puts going to website: #{url} browser.goto(url) puts Browser went to: #{browser.url} end On Mar 26, 8:50 am, George george.sand...@gmail.com wrote: Hi Kevin, I did a quick check...I think you just need whitespace, not quotes to separate your data using w{}. You'll also need to use {} instead of (). -George On Mar 26, 8:01 am, Kevin White ilium...@gmail.com wrote: Let me comment on my own post with an example. I might be having a Ruby problem and not a Watir problem. Here is what I am trying to do: require 'watir' Watir::Browser.default = 'firefox' browser = Watir::Browser.new sites = %w(www.google.com www.yahoo.com www.microsoft.com) sites.each do |url| puts going to website: #{url} browser.goto(url) puts Browser went to: #{browser.url} end On Mar 26, 10:46 am, Kevin White ilium...@gmail.com wrote: I'm trying to test that a web application always redirects back to a login page if you try to go to one of the application's pages when you're not logged in. First, I do: browser.goto(http://www.pagethatredirects.com;) Then, I look at the contents of @browser.url and I get about: blank, which is what my firefox install opens up to. From what I've read, Watir/firewatir should be waiting until the page is loaded before executing the browser.url statement. I'm basing that on:http://wiki.openqa.org/display/WTR/How+to+wait+with+Watir However, that isn't really working the way I expect. Should I be using wait_until? --~--~-~--~~~---~--~~ 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] Can Watir record script to test ad placements are correct on blog pages?
Want to automate a script to run automated script to verify up to 25 different blog pages to ensure ad placement displays and renders correctly. Look forward to your replies. -Scott --~--~-~--~~~---~--~~ 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: Need to find text of an element using watir
Something like browser.text ? Can you give us an understanding of the larger problem you are trying to solve? Can you show us the code that you've tried, the results they have given, and the reason why the results are not what you are looking for? /\/\ark -Original Message- From: watir-general@googlegroups.com [mailto:watir- gene...@googlegroups.com] On Behalf Of Vikas Tulashyam Sent: Thursday, March 26, 2009 7:09 AM To: Watir General Subject: [wtr-general] Re: Need to find text of an element using watir Hi Thanks for the reply but we want to get the text of all the element by using a single method and not the object itself. So is it possible in Watir? Do we have any method like getText() which returns the text for all the elements. Thanks On Mar 26, 3:11 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Mar 26, 2009 at 11:05, aditi aditi_...@yahoo.com wrote: Is there any common method? browser.show_all_objects Željko __ Information from ESET NOD32 Antivirus, version of virus signature database 3965 (20090326) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __ Information from ESET NOD32 Antivirus, version of virus signature database 3966 (20090326) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __ Information from ESET NOD32 Antivirus, version of virus signature database 3966 (20090326) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com --~--~-~--~~~---~--~~ 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: unknown property or method `navigate' HRESULT error code:0x800706ba The RPC server is unavailable.
I am opening and closing IE all the time. Probably about 8 times a minute. Cheers, Alister On Mar 26, 7:49 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Mar 26, 2009 at 06:36, Alister Scott alister.sc...@gmail.com wrote: The RPC server is unavailable. If my memory servers me, I think there is an old problem that would cause such error message when opening and closing IE a lot. Are you using the same browser every time, or are you opening and closing IE after each test? Željko --~--~-~--~~~---~--~~ 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: unknown property or method `navigate' HRESULT error code:0x800706ba The RPC server is unavailable.
So to answer your original question. Opening and closing the browser all the time is what you are doing wrong. If you must do this, you should use the Watir::IE.new_process to open the new browsers. This will avoid the error you are seeing. Bret Alister Scott wrote: I am opening and closing IE all the time. Probably about 8 times a minute. Cheers, Alister On Mar 26, 7:49 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Mar 26, 2009 at 06:36, Alister Scott alister.sc...@gmail.com wrote: The RPC server is unavailable. If my memory servers me, I think there is an old problem that would cause such error message when opening and closing IE a lot. Are you using the same browser every time, or are you opening and closing IE after each test? Željko -- Bret Pettichord CTO, WatirCraft LLC, www.watircraft.com Lead Developer, Watir, www.watir.com Blog, www.io.com/~wazmo/blog Twitter, www.twitter.com/bpettichord Watir Training: Portland/Beaverton April 16-17 www.watircraft.com/training --~--~-~--~~~---~--~~ 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] Classes and Modules and Defs and understanding and referencing correctly
I've got a bunch of scripts that I load and include. Seems like the sensible thing to do: load 'global.rb' include Global load 'login.rb' include Login etc, etc. In the above login.rb, there's the following: def login(username, password) yada yada end However I'm also loading a *whole* lot of other scripts from a completely different watir library (for another application works alongside this application under test). Within this is another piece of code with another def with the same name as above: def login(username, password) yada yada different stuff end * Firstly, is there something completely wrong with doing this? Both Apps have their own Login screen which differ slightly, I think I'd like to keep the login script for each different. * When I run login({username}, {password}) it tends to pickup the incorrect Module and try to execute the *other* version of login(). Any way I can force which one it should use? * Anyone got any good links for understanding Classes / Modules / Def a little better. I think I'm failing to understand this completely. - Jason --~--~-~--~~~---~--~~ 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: Classes and Modules and Defs and understanding and referencing correctly
Regarding bulletpoints 2 and 3: If you reference the module name before the method, you'll run the appropriate method (e.g Module.method vs. method) Take a look at http://www.ruby-doc.org/docs/ProgrammingRuby/. Specifically: Classes, Objects and Variables; and Modules (both links listed in the left hand nav). On Mar 26, 3:54 pm, Jason freezingki...@gmail.com wrote: I've got a bunch of scripts that I load and include. Seems like the sensible thing to do: load 'global.rb' include Global load 'login.rb' include Login etc, etc. In the above login.rb, there's the following: def login(username, password) yada yada end However I'm also loading a *whole* lot of other scripts from a completely different watir library (for another application works alongside this application under test). Within this is another piece of code with another def with the same name as above: def login(username, password) yada yada different stuff end * Firstly, is there something completely wrong with doing this? Both Apps have their own Login screen which differ slightly, I think I'd like to keep the login script for each different. * When I run login({username}, {password}) it tends to pickup the incorrect Module and try to execute the *other* version of login(). Any way I can force which one it should use? * Anyone got any good links for understanding Classes / Modules / Def a little better. I think I'm failing to understand this completely. - Jason --~--~-~--~~~---~--~~ 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: unknown property or method `navigate' HRESULT error code:0x800706ba The RPC server is unavailable.
Thanks Bret. I guess the alternative is to use the same browser but I would need to use Watir::IE.find which might be as troublesome. Cheers, Alister On Mar 27, 8:17 am, Bret Pettichord b...@pettichord.com wrote: So to answer your original question. Opening and closing the browser all the time is what you are doing wrong. If you must do this, you should use the Watir::IE.new_process to open the new browsers. This will avoid the error you are seeing. Bret Alister Scott wrote: I am opening and closing IE all the time. Probably about 8 times a minute. Cheers, Alister On Mar 26, 7:49 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Mar 26, 2009 at 06:36, Alister Scott alister.sc...@gmail.com wrote: The RPC server is unavailable. If my memory servers me, I think there is an old problem that would cause such error message when opening and closing IE a lot. Are you using the same browser every time, or are you opening and closing IE after each test? Željko -- Bret Pettichord CTO, WatirCraft LLC,www.watircraft.com Lead Developer, Watir,www.watir.com Blog,www.io.com/~wazmo/blog Twitter,www.twitter.com/bpettichord Watir Training: Portland/Beaverton April 16-17www.watircraft.com/training --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---