[wtr-general] how can i execute only one worksheet in a spresdsheet in Rasta
Hello all I have three worksheet in a spreadsheeet with tab name rasta_math,rast_string,and rasta_numger it is stored in spreadsheet with name as workt.xls how can i run only the single worksheet(rasta_math) when i use command rasta examples/workt.xls -f example/fixtures it run all the worksheet i.e. rasta_math,rast_string,and rasta_numger But iwant to run only rasta_math how can i ? IS threr any command to run trhe specific worksheet ? Thanks in advance --~--~-~--~~~---~--~~ 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: Package creation
Vikas, Ruby probably isn't what you're looking for in that case. Although I have previously seen some options for creating executables from Ruby code. I don't have any links or information on them. Alex On 13 Mar 2009, at 04:05, Vikas Tulashyam vtulash...@gmail.com wrote: Hi Tiffany, Thanks for the time, I went through the examples at the link, but I coudn't find anything suitable. I want to create a executable package and don't want to provide the source code to the user. Thanks On Mar 12, 11:22 pm, Tiffany Fodor tcfo...@comcast.net wrote: Hi Vikas! I recommend that you take a look at the wiki - there are lots of tutorials and examples: http://wiki.openqa.org/display/WTR/Examples -Tiffany On Mar 11, 11:47 pm, Vikas Tulashyam vtulash...@gmail.com wrote: Hi, I am trying to create a framework in Watir, so I need to create a package/Installable for this purpose. Please give me some pointer in this area. 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: Hoe to Execute another scripts
Hey Guys, Thanks for the time. I tried using Rake and Hoe but i couldn't find the exact way to create packages. Please help me with some examples if you guys can. Thanks in advance On Mar 12, 7:48 pm, marekj marekj@gmail.com wrote: sorry, but Hoe,http://seattlerb.rubyforge.org/hoe/ would not be the best way to execute scripts Use Rake, SpecTask or good old TestUnit runner. marekj Watirloo: Semantic Page Objects in UseCases Human Readable Machine Executable Acceptance Testinghttp://github.com/marekj/watirloo/ On Thu, Mar 12, 2009 at 7:02 AM, Vikas Tulashyam vtulash...@gmail.comwrote: Hi Guys, Please provide me the solution for the following problems 1. I want to execute ruby scripts from a single file, like I want to create a Test suite and want to call each test case which is a separate ruby file, so how to call scripts. 2. I am creating some common utilities for my project , so How I can call them in my projects, let say I have created a Module 'CommonUtils' in Directory-file - C://Test/Common.rb . So can I call this scripts by providing the exact path of the ruby script and I can call this within that folder only. 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: HttpWatch and Watir 1.6.2
Now it works, thanks guys! Cheers, John On Mar 12, 3:44 pm, marekj marekj@gmail.com wrote: I wrote this a year agohttp://www.marekj.com/2008/04/using-httpwatch-with-watir/ With Watir 1.6.2 you don't have to change anything. You stil work with IE right? and here is your bug: plugin = control.browser.Attach(browser.browser) # = should be browser.ie But this gives an error: in `method_missing': unknown property or method `browser' # = IE class does not have browser method marekj Watirloo: Semantic Page Objects in UseCaseshttp://github.com/marekj/watirloo/ On Thu, Mar 12, 2009 at 8:32 AM, JArkelen johnvanarke...@gmail.com wrote: Hi, With this example you can integrate HttpWatch with Watir: require 'win32ole' require 'watir' control = WIN32OLE.new('HttpWatch.Controller') ie = Watir::IE.new plugin = control.ie.Attach(ie.ie) plugin.Clear() plugin.Record() ie.goto(www.google.com) plugin.stop() Now I want to use this with Watir 1.6.2 and I assume that these lines would be changed: browser = Watir::Browser.new plugin = control.browser.Attach(browser.browser) But this gives an error: in `method_missing': unknown property or method `browser' Any ideas? Cheers, John --~--~-~--~~~---~--~~ 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: soa testing
For testing SOAP I use SoapUI tool. http://www.soapui.org/ . You can write unit-tests in it On 12 мар, 15:14, bright brightrobin1...@gmail.com wrote: Just to confirm, does Watir supportSOAtesting. --~--~-~--~~~---~--~~ 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] How to retrive table cell numbers by text value?
Hi all, Greetings!. I need to find out the row and column number of a table based on the given text. Do we have any direct method available in WATIR for this or do i need to write the old traditional class for retrieving cell numbers? Thanks Regards Siva Phaneendra Krapa --~--~-~--~~~---~--~~ 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: Overiding onclick javascript
Using this html file: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd; html head titleSample/title script type=text/javascript function doSomething(e) { alert('inside preexisting hanlder'); alert((window.event ? '' : 'not ') + 'found : window.event'); alert((e ? '' : 'not ') + 'found : window.event'); } /script /head body div button id=oneOne/button button id=twoTwo/button /div /body /html and this ruby code: require 'watir' include Watir module Watir class IE def run_script(js) ie.document.parentWindow.execScript(js) end end end ie = IE::start('c:/test.html') ie.button(:id, 'one').click#does nothing - no handler ie.run_script(document.getElementById('one').onclick=doSomething) p 'clicking one' ie.button(:id, 'one').click#shows doSomething handler ie.run_script(var func = function() { + alert(window.event ? 'found' : 'not found'); if (window.event) alert(window.event.altKey);+ }; + document.getElementById('two').onclick=func); p 'clicking two' ie.button(:id, 'two').click#shows injected handler #press two manually here with alt held down to see event info --- See what you get. You mentioned IE, so I tried it on IE 6 (the only IE I have laying around). There are a lot of ways to attach event handlers in javascript and I'm not a javascript wizard by any means so I'm sure there are better ways. Hope it helps. -andy On Thu, Mar 12, 2009 at 2:54 PM, andrew.d...@lthree.com wrote: Yea, I've tried passing it as a parm with no luck also. Everything says it is supposed to work, but I can't get it. -~--~~~~--~~--~--~--- --~--~-~--~~~---~--~~ 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 retrive table cell numbers by text value?
I created a function to do it, I asked the same question at the beginning of the week. Take account I wrote it for just the body of the table and some tables we work with have multiple body section. def get_row_from_cell_text(table_id,cell_text) row_counter = 1 b_counter = 1 row_num = 0 while table_id.body(:index,b_counter).exist? table_id.body(:index,b_counter).each do | row | if row.visible? if row.text.include?(cell_text) #set row num row_num = row_counter break end row_counter = row_counter + 1 end end b_counter = b_counter + 1 end return row_num end -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of sHiVa Sent: Friday, March 13, 2009 6:01 AM To: Watir General Subject: [wtr-general] How to retrive table cell numbers by text value? Hi all, Greetings!. I need to find out the row and column number of a table based on the given text. Do we have any direct method available in WATIR for this or do i need to write the old traditional class for retrieving cell numbers? Thanks Regards Siva Phaneendra Krapa --~--~-~--~~~---~--~~ 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: Overiding onclick javascript
What follows is a working solution and some lessons learned in handling popups. Thanks for everyone that has helped along the way. I needed to handle confirmation popups. After trying autoit based solutions without success, I decided to try a solution that has worked for me in the past - overriding the javascript that displays the popup. The two things that made this hard are : 1) I was working within a frame, 2) IE. When you are working within a frame environment, you must call execScript on the frame's window. This is because IE - unlike all other browsers - only passes a reference to your function. The function will get called, but any references to the js object 'window' will be to the window where the js resides, not the window for the frame containing the button. I would probably not have this problem with any other browser (although I haven't actually tested it as my app doesn't run on anything but IE) The final working code looks like: onclick_js = function(event){ onclick_js +=event = window.event; onclick_js +=if(event){ onclick_js += alert('found event'); onclick_js +=} else { onclick_js += alert('no event available'); onclick_js +=} onclick_js += } js = var myelem=document.getElementById(' + html_id + '); js += if(myelem){ js +=myelem.onclick= + onclick_js + ; js += } @browser.frame(:id, 'top_frame').document.parentWindow.execScript (js, javascript) Please note the last line. Here is an alternative that did NOT work. @browser.document.parentWindow.execScript(js, javascript) # seems to work, but no event object is available to handler!! Thanks and I hope this helps someone else. On Mar 13, 5:54 am, Andy Sipe ajs.gene...@gmail.com wrote: Using this html file: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//ENhttp://www.w3.org/TR/html4/strict.dtd; html head titleSample/title script type=text/javascript function doSomething(e) { alert('inside preexisting hanlder'); alert((window.event ? '' : 'not ') + 'found : window.event'); alert((e ? '' : 'not ') + 'found : window.event'); } /script /head body div button id=oneOne/button button id=twoTwo/button /div /body /html and this ruby code: require 'watir' include Watir module Watir class IE def run_script(js) ie.document.parentWindow.execScript(js) end end end ie = IE::start('c:/test.html') ie.button(:id, 'one').click #does nothing - no handler ie.run_script(document.getElementById('one').onclick=doSomething) p 'clicking one' ie.button(:id, 'one').click #shows doSomething handler ie.run_script(var func = function() { + alert(window.event ? 'found' : 'not found'); if (window.event) alert(window.event.altKey);+ }; + document.getElementById('two').onclick=func); p 'clicking two' ie.button(:id, 'two').click #shows injected handler #press two manually here with alt held down to see event info --- See what you get. You mentioned IE, so I tried it on IE 6 (the only IE I have laying around). There are a lot of ways to attach event handlers in javascript and I'm not a javascript wizard by any means so I'm sure there are better ways. Hope it helps. -andy On Thu, Mar 12, 2009 at 2:54 PM, andrew.d...@lthree.com wrote: Yea, I've tried passing it as a parm with no luck also. Everything says it is supposed to work, but I can't get it. -~--~~~~--~~--~--~ 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: Overiding onclick javascript
Andrew, Here's a link to Paul's event code, the files are on the attachments tab. http://wiki.openqa.org/display/WTR/Possibilities+For+New+Events+in+Watir hth, Charley Baker blog: http://blog.charleybaker.org/ Lead Developer, Watir, http://wtr.rubyforge.org QA Architect, Gap Inc Direct On Fri, Mar 13, 2009 at 7:42 AM, andrew.d...@lthree.com wrote: What follows is a working solution and some lessons learned in handling popups. Thanks for everyone that has helped along the way. I needed to handle confirmation popups. After trying autoit based solutions without success, I decided to try a solution that has worked for me in the past - overriding the javascript that displays the popup. The two things that made this hard are : 1) I was working within a frame, 2) IE. When you are working within a frame environment, you must call execScript on the frame's window. This is because IE - unlike all other browsers - only passes a reference to your function. The function will get called, but any references to the js object 'window' will be to the window where the js resides, not the window for the frame containing the button. I would probably not have this problem with any other browser (although I haven't actually tested it as my app doesn't run on anything but IE) The final working code looks like: onclick_js = function(event){ onclick_js +=event = window.event; onclick_js +=if(event){ onclick_js += alert('found event'); onclick_js +=} else { onclick_js += alert('no event available'); onclick_js +=} onclick_js += } js = var myelem=document.getElementById(' + html_id + '); js += if(myelem){ js +=myelem.onclick= + onclick_js + ; js += } @browser.frame(:id, 'top_frame').document.parentWindow.execScript (js, javascript) Please note the last line. Here is an alternative that did NOT work. @browser.document.parentWindow.execScript(js, javascript) # seems to work, but no event object is available to handler!! Thanks and I hope this helps someone else. On Mar 13, 5:54 am, Andy Sipe ajs.gene...@gmail.com wrote: Using this html file: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd; html head titleSample/title script type=text/javascript function doSomething(e) { alert('inside preexisting hanlder'); alert((window.event ? '' : 'not ') + 'found : window.event'); alert((e ? '' : 'not ') + 'found : window.event'); } /script /head body div button id=oneOne/button button id=twoTwo/button /div /body /html and this ruby code: require 'watir' include Watir module Watir class IE def run_script(js) ie.document.parentWindow.execScript(js) end end end ie = IE::start('c:/test.html') ie.button(:id, 'one').click#does nothing - no handler ie.run_script(document.getElementById('one').onclick=doSomething) p 'clicking one' ie.button(:id, 'one').click#shows doSomething handler ie.run_script(var func = function() { + alert(window.event ? 'found' : 'not found'); if (window.event) alert(window.event.altKey);+ }; + document.getElementById('two').onclick=func); p 'clicking two' ie.button(:id, 'two').click#shows injected handler #press two manually here with alt held down to see event info --- See what you get. You mentioned IE, so I tried it on IE 6 (the only IE I have laying around). There are a lot of ways to attach event handlers in javascript and I'm not a javascript wizard by any means so I'm sure there are better ways. Hope it helps. -andy On Thu, Mar 12, 2009 at 2:54 PM, andrew.d...@lthree.com wrote: Yea, I've tried passing it as a parm with no luck also. Everything says it is supposed to work, but I can't get it. -~--~~~~--~~--~--~ 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] How do you recommend working with table THEAD or TFOOT?
TBODY works nice table_id.body How could I create THEAD table.head TFOOT table.head I looked for it in table.rb, I was going to see what it took to mimic table_id.body, but I could even find that. --~--~-~--~~~---~--~~ 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] Error when trying to open Watir::IE browser
Hi, Im a newbie to Watir and Ruby. My problem is that when I try to open an IE browser, it fails. Firefox works. I would like to be able to use both browsers at will. I verified that I physically have a file called ie.rb in the following directory: C:\Ruby1\lib\ruby\gems \1.8\gems\watir-1.6.2\lib\watir Incidentally, if I have: require watir_simple I get the same no such file to load error. But again, watir_simple.rb exits in the path above. Thank you for your help in advance! CODE: require watir ie=Watir::IE.start('http://www.google.com') ERROR: javascriptTest.rb:2: no such file to load -- watir/ie (LoadError) RubyGems Environment: - RUBYGEMS VERSION: 1.3.1 - RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] - INSTALLATION DIRECTORY: C:/Ruby1/lib/ruby/gems/1.8 - RUBY EXECUTABLE: C:/Ruby1/bin/ruby.exe - EXECUTABLE DIRECTORY: C:/Ruby1/bin - RUBYGEMS PLATFORMS: - ruby - x86-mswin32-60 - GEM PATHS: - C:/Ruby1/lib/ruby/gems/1.8 - C:/Documents and Settings/hurivero/.gem/ruby/1.8 - GEM CONFIGURATION: - :update_sources = true - :verbose = true - :benchmark = false - :backtrace = false - :bulk_threshold = 1000 - REMOTE SOURCES: - http://gems.rubyforge.org/ *** LOCAL GEMS *** activesupport (2.2.2) builder (2.1.2) commonwatir (1.6.2) firewatir (1.6.2) fxri (0.3.6) fxruby (1.6.16) hoe (1.10.0) hpricot (0.6.164) log4r (1.0.5) ptools (1.1.6) rake (0.8.4, 0.8.1) ruby-opengl (0.60.0) rubyforge (1.0.3) s4t-utils (1.0.4) test-unit (2.0.1) user-choices (1.1.6) watir (1.6.2) win32-api (1.2.1, 1.2.0) win32-clipboard (0.4.4) win32-dir (0.3.2) win32-eventlog (0.5.0) win32-file (0.5.5) win32-file-stat (1.3.1) win32-process (0.5.9) win32-sapi (0.1.4) win32-sound (0.4.1) windows-api (0.3.0, 0.2.4) windows-pr (0.9.3) xml-simple (1.0.12) --~--~-~--~~~---~--~~ 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 do you recommend working with table THEAD or TFOOT?
TFOOT table.foot -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Moochie Sent: Friday, March 13, 2009 10:18 AM To: Watir General Subject: [wtr-general] How do you recommend working with table THEAD or TFOOT? TBODY works nice table_id.body How could I create THEAD table.head TFOOT table.head I looked for it in table.rb, I was going to see what it took to mimic table_id.body, but I could even find that. --~--~-~--~~~---~--~~ 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 do you recommend working with table THEAD or TFOOT?
Ok, I found the body tag C:\Ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\lib\watir -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Darin Duphorn Sent: Friday, March 13, 2009 10:21 AM To: watir-general@googlegroups.com Subject: [wtr-general] Re: How do you recommend working with table THEAD or TFOOT? TFOOT table.foot -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Moochie Sent: Friday, March 13, 2009 10:18 AM To: Watir General Subject: [wtr-general] How do you recommend working with table THEAD or TFOOT? TBODY works nice table_id.body How could I create THEAD table.head TFOOT table.head I looked for it in table.rb, I was going to see what it took to mimic table_id.body, but I could even find that. --~--~-~--~~~---~--~~ 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] checkbox selection
How do i select particular checkbox from the table as every checkbox has same id and i don't want to use the value of that checkbox Thanks in advance --~--~-~--~~~---~--~~ 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: Error when trying to open Watir::IE browser
require 'watir/browser' Watir::Browser.default = 'ie' b = Watir::Browser.new --- On Fri, 3/13/09, bert tumbaol...@yahoo.com wrote: From: bert tumbaol...@yahoo.com Subject: [wtr-general] Error when trying to open Watir::IE browser To: Watir General watir-general@googlegroups.com Date: Friday, March 13, 2009, 8:15 AM Hi, Im a newbie to Watir and Ruby. My problem is that when I try to open an IE browser, it fails. Firefox works. I would like to be able to use both browsers at will. I verified that I physically have a file called ie.rb in the following directory: C:\Ruby1\lib\ruby\gems \1.8\gems\watir-1.6.2\lib\watir Incidentally, if I have: require watir_simple I get the same no such file to load error. But again, watir_simple.rb exits in the path above. Thank you for your help in advance! CODE: require watir ie=Watir::IE.start('http://www.google.com') ERROR: javascriptTest.rb:2: no such file to load -- watir/ie (LoadError) RubyGems Environment: - RUBYGEMS VERSION: 1.3.1 - RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] - INSTALLATION DIRECTORY: C:/Ruby1/lib/ruby/gems/1.8 - RUBY EXECUTABLE: C:/Ruby1/bin/ruby.exe - EXECUTABLE DIRECTORY: C:/Ruby1/bin - RUBYGEMS PLATFORMS: - ruby - x86-mswin32-60 - GEM PATHS: - C:/Ruby1/lib/ruby/gems/1.8 - C:/Documents and Settings/hurivero/.gem/ruby/1.8 - GEM CONFIGURATION: - :update_sources = true - :verbose = true - :benchmark = false - :backtrace = false - :bulk_threshold = 1000 - REMOTE SOURCES: - http://gems.rubyforge.org/ *** LOCAL GEMS *** activesupport (2.2.2) builder (2.1.2) commonwatir (1.6.2) firewatir (1.6.2) fxri (0.3.6) fxruby (1.6.16) hoe (1.10.0) hpricot (0.6.164) log4r (1.0.5) ptools (1.1.6) rake (0.8.4, 0.8.1) ruby-opengl (0.60.0) rubyforge (1.0.3) s4t-utils (1.0.4) test-unit (2.0.1) user-choices (1.1.6) watir (1.6.2) win32-api (1.2.1, 1.2.0) win32-clipboard (0.4.4) win32-dir (0.3.2) win32-eventlog (0.5.0) win32-file (0.5.5) win32-file-stat (1.3.1) win32-process (0.5.9) win32-sapi (0.1.4) win32-sound (0.4.1) windows-api (0.3.0, 0.2.4) windows-pr (0.9.3) xml-simple (1.0.12) --~--~-~--~~~---~--~~ 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 print all the methods in the Class or Module out?
'require' and 'include' are completely two different concepts. When you require a ruby file you tell the current file to look for classes and modules in that file when needed, also any code not wrapped in method will be executed on require automatically. So you have to 'require' other file before you can 'include' modules that it owns. it's not either-or proposition. When you include a module into a class your class inherits methods defined in the module as it's own. You can see this in a decorator pattern. here is a good simple example with Coffee and Cream module http://ruby.simapse.com/2008/08/test.html Let's say you have a 1 bedroom apartment and one day you buy another 1 bedroom apartment next to yours. Now you are the owner of two apartments and you are free to go next door and use anything in that apartment for your needs in your first apartment. Include is like if one day you decide to knock the walls between two apartments and make it one. Therefore you no longer have to go next door, it is now part of your apartment. (disclaimer: I am hoping to write about Metaphors We Ruby By. how am I doing?) marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Thu, Mar 12, 2009 at 5:54 PM, Chuck van der Linden sqa...@gmail.comwrote: I'm still learning a lot regarding how ruby handles modules, classes etc.. but in general, woudln't using require instead of include solve his problem? (unless he's actually extending or subclassing stuff from the modules) I thought I remember seeing something about a lot of folks using include 'watir' when they should be using require 'watir' On Mar 12, 3:00 pm, marekj marekj@gmail.com wrote: On Thu, Mar 12, 2009 at 4:38 AM, wesley chen cjq@gmail.com wrote: Thanks, :), it is exactly what I want. I ask this kind of questions because I find, in my code, I use too many: include module. When I include the module into the class, all the methods in the module comes into the class's method. That's terrible. to remove the 'terrible' from listing do this use Object.local_methods patch. class Object def local_methods (methods - Object.instance_methods).sort end end so if you have class Foo def foo 'foo' end end then Bla.new.local_methods #= ['foo'] if you want methods defined only as instances of that object. useful. Wirble uses it for irb inspectionhttp://pablotron.org/software/wirble/ marekj Watirloo: Semantic Page Objects in UseCases Human Readable Machine Executable Acceptance Testinghttp:// github.com/marekj/watirloo/ Thanks. Wesley Chen.- 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: how can i execute only one worksheet in a spresdsheet in Rasta
You can use the commandline options --continue rasta_math --pagecount 1. There are also ways to run a given number of records or starting from a specific record. http://rasta.rubyforge.org should have the details or you can look at rasta --help for a quick list. Thanks! Hugh --~--~-~--~~~---~--~~ 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: checkbox selection
In Watirloo there is class CheckboxGroup for that http://github.com/marekj/watirloo/blob/7c5e757c0b2efce76f8254198ca62bb1c6d533b8/lib/watirloo/watir_ducktape.rb or you can roll your own solution easy. Each checkbox has to have the same 'name' to belown in a group, id is irrelevant at this point. name = 'your_checkbox_name_value' group = browser.checkboxes.find_all do |cb| cb.name == name end now you have a collection of checkboxes that share the same name. to set the 3rd checkbox you say group[2].set etc... marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Fri, Mar 13, 2009 at 10:44 AM, jitu jitu.ghar...@gmail.com wrote: How do i select particular checkbox from the table as every checkbox has same id and i don't want to use the value of that checkbox Thanks in advance --~--~-~--~~~---~--~~ 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: Watir::Browser (NameError)
remove include 'watir/browser' Shylaja wrote: Hi Iam trying to use the Browser class as follows with Watir 1.6.2 and facing a strange error require 'rubygems' require 'hpricot' require 'open-uri' require 'watir' include 'watir/browser' Watir::Browser.default = 'ie' appUrl = http://localhost:57200/index.html; doc = Hpricot(open(appUrl)) elements = doc.search(//*) browser.element_by_xpath(//a...@href=/test]).click() When i try to execute the above script i get the following error ruby parseHtml.rb parseHtml.rb:5: uninitialized constant Watir::Browser (NameError) Exit code: 1 any tips please? --~--~-~--~~~---~--~~ 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: Watir users: What is your role at work?
I used to be a tester. Then I became Test Design, Test Analyst, Test Developer, Test Architect etc... now I am just a Test Investigator I think. More and more I see testing as a discipline of investigating where Value is created and were it is Diminished. I can do it with automation code or manually going through an application of asking questions in a meeting with a developer to uncover my and his bias towards the problem space and proposes solutions. I think the days of QA Tester are over, (I mean in the sense of Quality Assurance school of testing) marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ --~--~-~--~~~---~--~~ 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: Error when trying to open Watir::IE browser
Thanks for the suggestion, but still getting an error. It seems there may be something wrong with my environment or system or some gem package problem. I don't think its a code problem. I tried: require watir require 'watir/browser' Watir::Browser.default = 'ie' b = Watir::Browser.new and get this error: C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/browser.rb: 75:in `klass': (eval):1:in `klass': uninitialized constant Watir::IE (NameError) from C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/ watir/browser.rb:65:in `eval' from C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/ watir/browser.rb:75:in `klass' from C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/ watir/browser.rb:65:in `new' from javascriptTest.rb:4 when i replace 'ie' with 'firefox' everything works fine, but again in a Firefox browser, not an IE one. On Mar 13, 10:56 am, John Fitisoff jfitis...@yahoo.com wrote: require 'watir/browser' Watir::Browser.default = 'ie' b = Watir::Browser.new --- On Fri, 3/13/09, bert tumbaol...@yahoo.com wrote: From: bert tumbaol...@yahoo.com Subject: [wtr-general] Error when trying to open Watir::IE browser To: Watir General watir-general@googlegroups.com Date: Friday, March 13, 2009, 8:15 AM Hi, Im a newbie to Watir and Ruby. My problem is that when I try to open an IE browser, it fails. Firefox works. I would like to be able to use both browsers at will. I verified that I physically have a file called ie.rb in the following directory: C:\Ruby1\lib\ruby\gems \1.8\gems\watir-1.6.2\lib\watir Incidentally, if I have: require watir_simple I get the same no such file to load error. But again, watir_simple.rb exits in the path above. Thank you for your help in advance! CODE: require watir ie=Watir::IE.start('http://www.google.com') ERROR: javascriptTest.rb:2: no such file to load -- watir/ie (LoadError) RubyGems Environment: - RUBYGEMS VERSION: 1.3.1 - RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] - INSTALLATION DIRECTORY: C:/Ruby1/lib/ruby/gems/1.8 - RUBY EXECUTABLE: C:/Ruby1/bin/ruby.exe - EXECUTABLE DIRECTORY: C:/Ruby1/bin - RUBYGEMS PLATFORMS: - ruby - x86-mswin32-60 - GEM PATHS: - C:/Ruby1/lib/ruby/gems/1.8 - C:/Documents and Settings/hurivero/.gem/ruby/1.8 - GEM CONFIGURATION: - :update_sources = true - :verbose = true - :benchmark = false - :backtrace = false - :bulk_threshold = 1000 - REMOTE SOURCES: -http://gems.rubyforge.org/ *** LOCAL GEMS *** activesupport (2.2.2) builder (2.1.2) commonwatir (1.6.2) firewatir (1.6.2) fxri (0.3.6) fxruby (1.6.16) hoe (1.10.0) hpricot (0.6.164) log4r (1.0.5) ptools (1.1.6) rake (0.8.4, 0.8.1) ruby-opengl (0.60.0) rubyforge (1.0.3) s4t-utils (1.0.4) test-unit (2.0.1) user-choices (1.1.6) watir (1.6.2) win32-api (1.2.1, 1.2.0) win32-clipboard (0.4.4) win32-dir (0.3.2) win32-eventlog (0.5.0) win32-file (0.5.5) win32-file-stat (1.3.1) win32-process (0.5.9) win32-sapi (0.1.4) win32-sound (0.4.1) windows-api (0.3.0, 0.2.4) windows-pr (0.9.3) xml-simple (1.0.12) --~--~-~--~~~---~--~~ 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: checkbox selection
given the situation you describe, how do YOU know which is the right checkbox to select if you are running the test manually? the answer to that might tell you what property you want to use to select the checkbox On Mar 13, 8:44 am, jitu jitu.ghar...@gmail.com wrote: How do i select particular checkbox from the table as every checkbox has same id and i don't want to use the value of that checkbox Thanks in advance --~--~-~--~~~---~--~~ 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: Error when trying to open Watir::IE browser
Sorry, missed the 'both browsers at will part'. Not sure if that's supported right now. BTW, you probably don't want to require 'watir' directly, all you really need when doing it that way is to require 'watir/browser'. But that's not causing your error. --- On Fri, 3/13/09, bert tumbaol...@yahoo.com wrote: From: bert tumbaol...@yahoo.com Subject: [wtr-general] Re: Error when trying to open Watir::IE browser To: Watir General watir-general@googlegroups.com Date: Friday, March 13, 2009, 9:29 AM Thanks for the suggestion, but still getting an error. It seems there may be something wrong with my environment or system or some gem package problem. I don't think its a code problem. I tried: require watir require 'watir/browser' Watir::Browser.default = 'ie' b = Watir::Browser.new and get this error: C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/browser.rb: 75:in `klass': (eval):1:in `klass': uninitialized constant Watir::IE (NameError) from C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/ watir/browser.rb:65:in `eval' from C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/ watir/browser.rb:75:in `klass' from C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/ watir/browser.rb:65:in `new' from javascriptTest.rb:4 when i replace 'ie' with 'firefox' everything works fine, but again in a Firefox browser, not an IE one. On Mar 13, 10:56 am, John Fitisoff jfitis...@yahoo.com wrote: require 'watir/browser' Watir::Browser.default = 'ie' b = Watir::Browser.new --- On Fri, 3/13/09, bert tumbaol...@yahoo.com wrote: From: bert tumbaol...@yahoo.com Subject: [wtr-general] Error when trying to open Watir::IE browser To: Watir General watir-general@googlegroups.com Date: Friday, March 13, 2009, 8:15 AM Hi, Im a newbie to Watir and Ruby. My problem is that when I try to open an IE browser, it fails. Firefox works. I would like to be able to use both browsers at will. I verified that I physically have a file called ie.rb in the following directory: C:\Ruby1\lib\ruby\gems \1.8\gems\watir-1.6.2\lib\watir Incidentally, if I have: require watir_simple I get the same no such file to load error. But again, watir_simple.rb exits in the path above. Thank you for your help in advance! CODE: require watir ie=Watir::IE.start('http://www.google.com') ERROR: javascriptTest.rb:2: no such file to load -- watir/ie (LoadError) RubyGems Environment: - RUBYGEMS VERSION: 1.3.1 - RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] - INSTALLATION DIRECTORY: C:/Ruby1/lib/ruby/gems/1.8 - RUBY EXECUTABLE: C:/Ruby1/bin/ruby.exe - EXECUTABLE DIRECTORY: C:/Ruby1/bin - RUBYGEMS PLATFORMS: - ruby - x86-mswin32-60 - GEM PATHS: - C:/Ruby1/lib/ruby/gems/1.8 - C:/Documents and Settings/hurivero/.gem/ruby/1.8 - GEM CONFIGURATION: - :update_sources = true - :verbose = true - :benchmark = false - :backtrace = false - :bulk_threshold = 1000 - REMOTE SOURCES: -http://gems.rubyforge.org/ *** LOCAL GEMS *** activesupport (2.2.2) builder (2.1.2) commonwatir (1.6.2) firewatir (1.6.2) fxri (0.3.6) fxruby (1.6.16) hoe (1.10.0) hpricot (0.6.164) log4r (1.0.5) ptools (1.1.6) rake (0.8.4, 0.8.1) ruby-opengl (0.60.0) rubyforge (1.0.3) s4t-utils (1.0.4) test-unit (2.0.1) user-choices (1.1.6) watir (1.6.2) win32-api (1.2.1, 1.2.0) win32-clipboard (0.4.4) win32-dir (0.3.2) win32-eventlog (0.5.0) win32-file (0.5.5) win32-file-stat (1.3.1) win32-process (0.5.9) win32-sapi (0.1.4) win32-sound (0.4.1) windows-api (0.3.0, 0.2.4) windows-pr (0.9.3) xml-simple (1.0.12) --~--~-~--~~~---~--~~ 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: css support in Watir
ie.element.document.currentStyle returns styles for example ie.element.document.currentStyle.fontSize ie.element.document.currentStyle.fontWeight. marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Wed, Mar 11, 2009 at 5:10 PM, Federico Zuppa fzu...@gmail.com wrote: Hi all, I am trying to do a test that verifies that 2 items in the page have the same css style (just a couple of properties, like font-size and font-weight). I saw there is an attribute called style that returns an ole_object and also saw there's a method ole_get_methods that return all the methods supported by the ole_object(fontStyle and fontWeight). However, when I try to print the fontSize, it doesn't print anything. Has anyone done this before? Do you have any examples I could follow? Thanks! Federico --~--~-~--~~~---~--~~ 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: Error when trying to open Watir::IE browser
Change require 'watir/browser' to require 'watir/ie' Thanks, Al Snow Agile Software Automation Developer Linkedin: http://www.linkedin.com/in/alsnow Google Talk: jasnow1 Twitter: jasnow Date: Fri, 13 Mar 2009 09:29:01 -0700 Subject: [wtr-general] Re: Error when trying to open Watir::IE browser From: tumbaol...@yahoo.com To: watir-general@googlegroups.com Thanks for the suggestion, but still getting an error. It seems there may be something wrong with my environment or system or some gem package problem. I don't think its a code problem. I tried: require watir require 'watir/browser' Watir::Browser.default = 'ie' b = Watir::Browser.new and get this error: C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/browser.rb: 75:in `klass': (eval):1:in `klass': uninitialized constant Watir::IE (NameError) from C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/ watir/browser.rb:65:in `eval' from C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/ watir/browser.rb:75:in `klass' from C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/ watir/browser.rb:65:in `new' from javascriptTest.rb:4 when i replace 'ie' with 'firefox' everything works fine, but again in a Firefox browser, not an IE one. On Mar 13, 10:56 am, John Fitisoff jfitis...@yahoo.com wrote: require 'watir/browser' Watir::Browser.default = 'ie' b = Watir::Browser.new --- On Fri, 3/13/09, bert tumbaol...@yahoo.com wrote: From: bert tumbaol...@yahoo.com Subject: [wtr-general] Error when trying to open Watir::IE browser To: Watir General watir-general@googlegroups.com Date: Friday, March 13, 2009, 8:15 AM Hi, Im a newbie to Watir and Ruby. My problem is that when I try to open an IE browser, it fails. Firefox works. I would like to be able to use both browsers at will. I verified that I physically have a file called ie.rb in the following directory: C:\Ruby1\lib\ruby\gems \1.8\gems\watir-1.6.2\lib\watir Incidentally, if I have: require watir_simple I get the same no such file to load error. But again, watir_simple.rb exits in the path above. Thank you for your help in advance! CODE: require watir ie=Watir::IE.start('http://www.google.com') ERROR: javascriptTest.rb:2: no such file to load -- watir/ie (LoadError) RubyGems Environment: - RUBYGEMS VERSION: 1.3.1 - RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] - INSTALLATION DIRECTORY: C:/Ruby1/lib/ruby/gems/1.8 - RUBY EXECUTABLE: C:/Ruby1/bin/ruby.exe - EXECUTABLE DIRECTORY: C:/Ruby1/bin - RUBYGEMS PLATFORMS: - ruby - x86-mswin32-60 - GEM PATHS: - C:/Ruby1/lib/ruby/gems/1.8 - C:/Documents and Settings/hurivero/.gem/ruby/1.8 - GEM CONFIGURATION: - :update_sources = true - :verbose = true - :benchmark = false - :backtrace = false - :bulk_threshold = 1000 - REMOTE SOURCES: -http://gems.rubyforge.org/ *** LOCAL GEMS *** activesupport (2.2.2) builder (2.1.2) commonwatir (1.6.2) firewatir (1.6.2) fxri (0.3.6) fxruby (1.6.16) hoe (1.10.0) hpricot (0.6.164) log4r (1.0.5) ptools (1.1.6) rake (0.8.4, 0.8.1) ruby-opengl (0.60.0) rubyforge (1.0.3) s4t-utils (1.0.4) test-unit (2.0.1) user-choices (1.1.6) watir (1.6.2) win32-api (1.2.1, 1.2.0) win32-clipboard (0.4.4) win32-dir (0.3.2) win32-eventlog (0.5.0) win32-file (0.5.5) win32-file-stat (1.3.1) win32-process (0.5.9) win32-sapi (0.1.4) win32-sound (0.4.1) windows-api (0.3.0, 0.2.4) windows-pr (0.9.3) xml-simple (1.0.12) _ Windows Live™ Groups: Create an online spot for your favorite groups to meet. http://windowslive.com/online/groups?ocid=TXT_TAGLM_WL_groups_032009 --~--~-~--~~~---~--~~ 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 it twice to make it work? click problem
I ran into a scenario where an onmouseover event was required before clicking: @browser.button(:id, 'link_id').fire_event('onmouseover') @browser.button(:id, 'link_id').click On Mar 12, 3:54 pm, Jim Matthews jim_m...@swbell.net wrote: Have any of you run into this problem before? You have to click a button or link or image twice to get it to take effect? I actually have run into this problem some in manual testing and usually with an image. The first time I click it, nothing happens. The second time I click it takes me where it should have gone with the first click. I am seeing this with an automated test. It was running against one server without a problem. I started having problems when I ran the same test, on the same computer, from the same IE version but against a different server. After some experimenting, it appears that if I specify clicking the link twice in a row it works. Have any of you run into this problem and more importantly, do you know what might be causing it and how to fix it? Jim --~--~-~--~~~---~--~~ 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 it twice to make it work? click problem
I ran into an scenario where an 'onmouseover' event was required before clicking: @browser.link(:id, 'link_id').fire_event('onmouseover') @browser.link(:id, 'link_id').click On Mar 12, 3:54 pm, Jim Matthews jim_m...@swbell.net wrote: Have any of you run into this problem before? You have to click a button or link or image twice to get it to take effect? I actually have run into this problem some in manual testing and usually with an image. The first time I click it, nothing happens. The second time I click it takes me where it should have gone with the first click. I am seeing this with an automated test. It was running against one server without a problem. I started having problems when I ran the same test, on the same computer, from the same IE version but against a different server. After some experimenting, it appears that if I specify clicking the link twice in a row it works. Have any of you run into this problem and more importantly, do you know what might be causing it and how to fix it? Jim --~--~-~--~~~---~--~~ 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: soa testing
On Mar 12, 8:31 am, Charley Baker charley.ba...@gmail.com wrote: No, Watir is a library to Automate browsers for web testing. That being said, Ruby has SOAP libraries(soap4r) that we're using quite extensively to test SOAP based services. The benefit of using a real language as opposed to VendorScript is that there are libraries for just about anything you'd want to do - XML, SOAP, databases, MQ, etc. And net/http and json are awfully nice for REST/JSON testing. My company has an extensive and powerful public REST API, and I poke around in it a lot with net/http and json. No browsers in sight. -Chris --~--~-~--~~~---~--~~ 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: Counting selection option
Well in a sense it did. it told you that the close paren was unexpected. Meaning in this case that it expected something along the lines of (parm1, param2) and didn't get that.. it found the closeing paren before it found the second parameter (which would have followed a comma, since the comma was missing, it treated everything as a single parameter, and hence didn't expect to find the paren where it did. takes a bit of experience to understand why something is 'unexpected' but generally it means 'I expected to find something else, before I found the unexpected thing' the tricky part is then looking in front of the 'unexpected' item to try and figure out what's missing that should have been there. (ruby is not unique in that kind of error being somewhat cryptic.. virtually all languages I've encountered suffer from this, there's just so far a compliler/processor can go in terms of figuring out what you were 'trying to do' which is pretty much needed in order to give good errors in a situation like this On Mar 12, 2:09 pm, maximore hri...@gmail.com wrote: actually it work flawlessly with out any error message after inserting the comma. I wish there was a way for Ruby to indicate some sense of direction like the error message above. maybe bceuz I am new and don't know how to work it out On Mar 12, 2:54 pm, Tiffany Fodor tcfo...@comcast.net wrote: Sorry - my bad - i had a typo in my example. You need a separator between the parameter and the attribute. You can use either a comma: list_options = ie.select_list(:name, 'my_list').getAllContents or = list_options = ie.select_list(:name = 'my_list').getAllContents -Tiffany On Mar 12, 1:33 pm, maximore hri...@gmail.com wrote: I added code and run program this was the error message that I git .estCases_AgiileIteration1.rb:198: syntax error, unexpected ')', expecting kEND When code is removed form program code error message go away . List_options=ie.select_list(:name securityQuestion).getAllContents On Mar 12, 11:32 am, Tiffany Fodor tcfo...@comcast.net wrote: Give this a try: list_options = ie.select_list(:name 'my_list').getAllContents #gives you an array of the options number_of_options = list_options.length #array method length gives you the number of elements in the array Hope this helps! -Tiffany On Mar 12, 10:11 am, maximore hri...@gmail.com wrote: hello I want to count the number of option on a pull down menu how can i go about doing just this in ruby? I know there is a way of going about this just don't know how . thanks- 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: soa testing
Good point, we're moving some services in that direction as well. It's nice to deal with. Charley Baker blog: http://blog.charleybaker.org/ Lead Developer, Watir, http://wtr.rubyforge.org QA Architect, Gap Inc Direct On Fri, Mar 13, 2009 at 1:09 PM, Chris McMahon christopher.mcma...@gmail.com wrote: On Mar 12, 8:31 am, Charley Baker charley.ba...@gmail.com wrote: No, Watir is a library to Automate browsers for web testing. That being said, Ruby has SOAP libraries(soap4r) that we're using quite extensively to test SOAP based services. The benefit of using a real language as opposed to VendorScript is that there are libraries for just about anything you'd want to do - XML, SOAP, databases, MQ, etc. And net/http and json are awfully nice for REST/JSON testing. My company has an extensive and powerful public REST API, and I poke around in it a lot with net/http and json. No browsers in sight. -Chris --~--~-~--~~~---~--~~ 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: Failed to start because msvcr80-ruby18.dll was not found
add require 'rubygems' to the top of your script. Dragan wrote: I am trying to install watir. That is what I have done: - install ruby 1.8.6-27 Release Candidate 2 - gem update --system - gem install watir Than I've got 'msvcr80-ruby18.dll was not found' problem when trying to run watir script. I have found this post, and therefore tried this: - gem uninstall win32-api 1. win32-api-1.2.0-x86-mswin32-60 2. win32-api-1.2.1-x86-mswin32-60 3. win32-api-1.4.0-x86-mswin32-80 4. All versions - I select 3, and than Y (Continue with Uninstall? [Yn]) It says Successfully uninstalled win32-api-1.4.0-x86-mswin32-80 on the end Now when I try to run watir script, I get no such file to load -- watir/ie (LoadError) for the line $ie = Watir::IE.new What did I do wrong? --~--~-~--~~~---~--~~ 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: Watir::Browser (NameError)
and add a line such as browser = Watir::Browser.new or you are likely to get an undefined method complaint when you to to use browser.element_by_xpath (unless there's something about Hpricot that is creating a browser object?) On Mar 13, 9:14 am, Bret Pettichord b...@pettichord.com wrote: remove include 'watir/browser' Shylaja wrote: Hi Iam trying to use the Browser class as follows with Watir 1.6.2 and facing a strange error require 'rubygems' require 'hpricot' require 'open-uri' require 'watir' include 'watir/browser' Watir::Browser.default = 'ie' appUrl = http://localhost:57200/index.html; doc = Hpricot(open(appUrl)) elements = doc.search(//*) browser.element_by_xpath(//a...@href=/test]).click() When i try to execute the above script i get the following error ruby parseHtml.rb parseHtml.rb:5: uninitialized constant Watir::Browser (NameError) Exit code: 1 any tips please?- 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: Error when trying to open Watir::IE browser
Seems like something must be missing.. I'm thinking your should consider saving your code off somewhere and doing a complete uninstall and reinstall of all watir stuff. I'm using IE.. I have the following in my script and it's working great require 'watir' require 'watir/testcase' #don't think this is needed for what you are doing.. # I also have requires for some other classes I am using for logging and reporting Watir::Browser.default = 'ie' $browser = Watir::Browser.new # (I'm making a global, but without $ should work) nothng more complicated than that in terms of getting a browser started and creating the instance of the browser object in my code. On Mar 13, 12:54 pm, bert tumbaol...@yahoo.com wrote: I tried require watir/ie and i get the same no such file to load -- watir/ie error On Mar 13, 1:05 pm, Al Snow jas...@hotmail.com wrote: Change require 'watir/browser' to require 'watir/ie' Thanks, Al Snow Agile Software Automation Developer Linkedin:http://www.linkedin.com/in/alsnow Google Talk: jasnow1 Twitter: jasnow Date: Fri, 13 Mar 2009 09:29:01 -0700 Subject: [wtr-general] Re: Error when trying to open Watir::IE browser From: tumbaol...@yahoo.com To: watir-general@googlegroups.com Thanks for the suggestion, but still getting an error. It seems there may be something wrong with my environment or system or some gem package problem. I don't think its a code problem. I tried: require watir require 'watir/browser' Watir::Browser.default = 'ie' b = Watir::Browser.new and get this error: C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/browser.rb: 75:in `klass': (eval):1:in `klass': uninitialized constant Watir::IE (NameError) from C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/ watir/browser.rb:65:in `eval' from C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/ watir/browser.rb:75:in `klass' from C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/ watir/browser.rb:65:in `new' from javascriptTest.rb:4 when i replace 'ie' with 'firefox' everything works fine, but again in a Firefox browser, not an IE one. On Mar 13, 10:56 am, John Fitisoff jfitis...@yahoo.com wrote: require 'watir/browser' Watir::Browser.default = 'ie' b = Watir::Browser.new --- On Fri, 3/13/09, bert tumbaol...@yahoo.com wrote: From: bert tumbaol...@yahoo.com Subject: [wtr-general] Error when trying to open Watir::IE browser To: Watir General watir-general@googlegroups.com Date: Friday, March 13, 2009, 8:15 AM Hi, Im a newbie to Watir and Ruby. My problem is that when I try to open an IE browser, it fails. Firefox works. I would like to be able to use both browsers at will. I verified that I physically have a file called ie.rb in the following directory: C:\Ruby1\lib\ruby\gems \1.8\gems\watir-1.6.2\lib\watir Incidentally, if I have: require watir_simple I get the same no such file to load error. But again, watir_simple.rb exits in the path above. Thank you for your help in advance! CODE: require watir ie=Watir::IE.start('http://www.google.com') ERROR: javascriptTest.rb:2: no such file to load -- watir/ie (LoadError) RubyGems Environment: - RUBYGEMS VERSION: 1.3.1 - RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] - INSTALLATION DIRECTORY: C:/Ruby1/lib/ruby/gems/1.8 - RUBY EXECUTABLE: C:/Ruby1/bin/ruby.exe - EXECUTABLE DIRECTORY: C:/Ruby1/bin - RUBYGEMS PLATFORMS: - ruby - x86-mswin32-60 - GEM PATHS: - C:/Ruby1/lib/ruby/gems/1.8 - C:/Documents and Settings/hurivero/.gem/ruby/1.8 - GEM CONFIGURATION: - :update_sources = true - :verbose = true - :benchmark = false - :backtrace = false - :bulk_threshold = 1000 - REMOTE SOURCES: -http://gems.rubyforge.org/ *** LOCAL GEMS *** activesupport (2.2.2) builder (2.1.2) commonwatir (1.6.2) firewatir (1.6.2) fxri (0.3.6) fxruby (1.6.16) hoe (1.10.0) hpricot (0.6.164) log4r (1.0.5) ptools (1.1.6) rake (0.8.4, 0.8.1) ruby-opengl (0.60.0) rubyforge (1.0.3) s4t-utils (1.0.4) test-unit (2.0.1) user-choices (1.1.6) watir (1.6.2) win32-api (1.2.1, 1.2.0) win32-clipboard (0.4.4) win32-dir (0.3.2) win32-eventlog (0.5.0) win32-file (0.5.5) win32-file-stat (1.3.1) win32-process (0.5.9) win32-sapi (0.1.4) win32-sound (0.4.1) windows-api (0.3.0, 0.2.4) windows-pr (0.9.3) xml-simple (1.0.12) _ Windows Live™ Groups: Create an online spot for your favorite groups to
[wtr-general] Re: Error when trying to open Watir::IE browser
Adding require 'rubygems' might help. bert wrote: Thanks for the suggestion, but still getting an error. It seems there may be something wrong with my environment or system or some gem package problem. I don't think its a code problem. I tried: require watir require 'watir/browser' Watir::Browser.default = 'ie' b = Watir::Browser.new and get this error: C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/browser.rb: 75:in `klass': (eval):1:in `klass': uninitialized constant Watir::IE (NameError) from C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/ watir/browser.rb:65:in `eval' from C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/ watir/browser.rb:75:in `klass' from C:/Ruby1/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/ watir/browser.rb:65:in `new' from javascriptTest.rb:4 when i replace 'ie' with 'firefox' everything works fine, but again in a Firefox browser, not an IE one. On Mar 13, 10:56 am, John Fitisoff jfitis...@yahoo.com wrote: require 'watir/browser' Watir::Browser.default = 'ie' b = Watir::Browser.new --- On Fri, 3/13/09, bert tumbaol...@yahoo.com wrote: From: bert tumbaol...@yahoo.com Subject: [wtr-general] Error when trying to open Watir::IE browser To: Watir General watir-general@googlegroups.com Date: Friday, March 13, 2009, 8:15 AM Hi, Im a newbie to Watir and Ruby. My problem is that when I try to open an IE browser, it fails. Firefox works. I would like to be able to use both browsers at will. I verified that I physically have a file called ie.rb in the following directory: C:\Ruby1\lib\ruby\gems \1.8\gems\watir-1.6.2\lib\watir Incidentally, if I have: require watir_simple I get the same no such file to load error. But again, watir_simple.rb exits in the path above. Thank you for your help in advance! CODE: require watir ie=Watir::IE.start('http://www.google.com') ERROR: javascriptTest.rb:2: no such file to load -- watir/ie (LoadError) RubyGems Environment: - RUBYGEMS VERSION: 1.3.1 - RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] - INSTALLATION DIRECTORY: C:/Ruby1/lib/ruby/gems/1.8 - RUBY EXECUTABLE: C:/Ruby1/bin/ruby.exe - EXECUTABLE DIRECTORY: C:/Ruby1/bin - RUBYGEMS PLATFORMS: - ruby - x86-mswin32-60 - GEM PATHS: - C:/Ruby1/lib/ruby/gems/1.8 - C:/Documents and Settings/hurivero/.gem/ruby/1.8 - GEM CONFIGURATION: - :update_sources = true - :verbose = true - :benchmark = false - :backtrace = false - :bulk_threshold = 1000 - REMOTE SOURCES: -http://gems.rubyforge.org/ *** LOCAL GEMS *** activesupport (2.2.2) builder (2.1.2) commonwatir (1.6.2) firewatir (1.6.2) fxri (0.3.6) fxruby (1.6.16) hoe (1.10.0) hpricot (0.6.164) log4r (1.0.5) ptools (1.1.6) rake (0.8.4, 0.8.1) ruby-opengl (0.60.0) rubyforge (1.0.3) s4t-utils (1.0.4) test-unit (2.0.1) user-choices (1.1.6) watir (1.6.2) win32-api (1.2.1, 1.2.0) win32-clipboard (0.4.4) win32-dir (0.3.2) win32-eventlog (0.5.0) win32-file (0.5.5) win32-file-stat (1.3.1) win32-process (0.5.9) win32-sapi (0.1.4) win32-sound (0.4.1) windows-api (0.3.0, 0.2.4) windows-pr (0.9.3) xml-simple (1.0.12) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---