[wtr-general] Re: click_no_wait again
Jarmo, I am pasting my code again here for your reference: $b = Watir::IE.attach(:url, myurl) sleep(2) btn = $b.button(:id, btnClear) $DEBUG = true btn.click_no_wait() $DEBUG=false I created my first browser object by an attach as in the first statement above. I didn't use any other attach statements in MY code. However, when I added the $DEBUG=true statement, the error message it output had another attach statement in it. Please refer my first email. This is coming from the implementation of click_no_wait function. click_no_wait seems to use attach internally to connect to the window that is pop opening. Clarification: I didn't do it! Until I had the Watir::IE.attach in my code to attach to my page(myurl), my code didn't work. I had to change the code as: $b=Watir::Browser.new $b.goto(myurl) : : And, everything started working fine. I hope it makes some sense to you now. If not, god save me!! :) I have called it quits. Thanks Babitha I hope On Jun 5, 7:04 am, Jarmo Pertman jarm...@gmail.com wrote: I still don't understand it all exactly. You had a browser object and ended up on the page where was a button, which created a javascript dialog upon clicking and then you used #attach for some reason and it didn't work? #attach should work, i don't see any reasons why it shouldn't. But regarding Javascript popups i'd avoid them altogether by overriding appropriate javascript function at correct place. You can read more about that from Simplest way to stop JavaScript Pop Ups from showing when running your Watir tests athttp://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups Jarmo On Jun 5, 1:05 pm, Babitha babitha.augus...@gmail.com wrote: My original code contained an IE.attach to connect to the page where I had the button that was pop opening the javascript dialog. This is what I modified. Not the internal watir code. So, in my original code I had to do: browser.goto(:url) instead of the IE.attach that I was doing. But, I still have this question..is it a known issue? On Jun 4, 2:01 pm, Jarmo Pertman jarm...@gmail.com wrote: How did you manage to exactly fix it with #goto? Jarmo On Jun 3, 7:32 am, Babitha babitha.augus...@gmail.com wrote: Finally, I found what the issue was. It is happening because I am using IE.attach to attach to the page instead of using browser.Start or browser.goto. With browser.goto things started working fine. Apparently the error message that was logged by the $DEBUG= true itself helped me. I saw that internally there is again a call to do an IE.attach, and I guessed that may be failing. Please see the relevant part of the error message below: Watir::Button.new(Watir::IE.attach(:hwnd, 591236), :unique_number, 4).click!(); On Jun 2, 1:50 pm, Babitha babitha.augus...@gmail.com wrote: Trust me. I have done my research. I know there were already many issues reported with element.click_no_wait and most of them are supposed to be fixed. But, I still have this problem with the latest version of watir. I am pretty sure with the same version of ruby it worked for me in another system, but as far as I can remember the watir version was an earlier one. My current ruby version is 1.86-26 p(111), watir -1.8.1 OS: Windows 7, IE 8. Here is the problem. I have a button on my page, clicking on which it displays a javascript confirmation dialog. I tried it with click() function, and it works fine. But, with click_no_wait() nothing happens, and the control just passes on to the next statement. Below is my code: $b = Watir::IE.attach(:url, myurl) sleep(2) btn = $b.button(:id, btnClear) $DEBUG = true btn.click_no_wait() $DEBUG=false My page does not use frames. As was suggested in some earlier questions, I put $DEBUG=true and $DEBUG=false statements around the click_no_wait call and below is what I got. #no_wait command: Exception `WIN32OLERuntimeError' at c:/ruby/lib/ruby/gems/1.8/gems/ watir-1.8.1/lib/watir/element.rb:208 - ruby -e $:.unshift('c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/ watir/win32ole').unshift('c:/ruby/lib/ruby/gems/1.8/gems/ commonwatir-1.8.1/lib').unshift('c:/ruby/lib/ruby/gems/1.8/gems/ firewatir-1.8.1/lib').unshift('c:/ruby/lib/ruby/gems/1.8/gems/ watir-1.8.1/lib');require 'c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/ lib/watir/core';Watir::Button.new(Watir::IE.attach(:hwnd, 591236), :unique_number, 4).click!(); OLE error code:0 in Unknown No Description HRESULT error code:0x80070057 The parameter is incorrect. c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/element.rb:58:in `assert_exists': Unable to locate element, using :unique_number, 4 (Watir::Exception::UnknownObjectException) from c:/ruby/lib
[wtr-general] Re: click_no_wait again
My original code contained an IE.attach to connect to the page where I had the button that was pop opening the javascript dialog. This is what I modified. Not the internal watir code. So, in my original code I had to do: browser.goto(:url) instead of the IE.attach that I was doing. But, I still have this question..is it a known issue? On Jun 4, 2:01 pm, Jarmo Pertman jarm...@gmail.com wrote: How did you manage to exactly fix it with #goto? Jarmo On Jun 3, 7:32 am, Babitha babitha.augus...@gmail.com wrote: Finally, I found what the issue was. It is happening because I am using IE.attach to attach to the page instead of using browser.Start or browser.goto. With browser.goto things started working fine. Apparently the error message that was logged by the $DEBUG= true itself helped me. I saw that internally there is again a call to do an IE.attach, and I guessed that may be failing. Please see the relevant part of the error message below: Watir::Button.new(Watir::IE.attach(:hwnd, 591236), :unique_number, 4).click!(); On Jun 2, 1:50 pm, Babitha babitha.augus...@gmail.com wrote: Trust me. I have done my research. I know there were already many issues reported with element.click_no_wait and most of them are supposed to be fixed. But, I still have this problem with the latest version of watir. I am pretty sure with the same version of ruby it worked for me in another system, but as far as I can remember the watir version was an earlier one. My current ruby version is 1.86-26 p(111), watir -1.8.1 OS: Windows 7, IE 8. Here is the problem. I have a button on my page, clicking on which it displays a javascript confirmation dialog. I tried it with click() function, and it works fine. But, with click_no_wait() nothing happens, and the control just passes on to the next statement. Below is my code: $b = Watir::IE.attach(:url, myurl) sleep(2) btn = $b.button(:id, btnClear) $DEBUG = true btn.click_no_wait() $DEBUG=false My page does not use frames. As was suggested in some earlier questions, I put $DEBUG=true and $DEBUG=false statements around the click_no_wait call and below is what I got. #no_wait command: Exception `WIN32OLERuntimeError' at c:/ruby/lib/ruby/gems/1.8/gems/ watir-1.8.1/lib/watir/element.rb:208 - ruby -e $:.unshift('c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/ watir/win32ole').unshift('c:/ruby/lib/ruby/gems/1.8/gems/ commonwatir-1.8.1/lib').unshift('c:/ruby/lib/ruby/gems/1.8/gems/ firewatir-1.8.1/lib').unshift('c:/ruby/lib/ruby/gems/1.8/gems/ watir-1.8.1/lib');require 'c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/ lib/watir/core';Watir::Button.new(Watir::IE.attach(:hwnd, 591236), :unique_number, 4).click!(); OLE error code:0 in Unknown No Description HRESULT error code:0x80070057 The parameter is incorrect. c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/element.rb:58:in `assert_exists': Unable to locate element, using :unique_number, 4 (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/ element.rb:275:in `click!' from -e:1 I have gone throughhttp://jira.openqa.org/browse/WTR-320andhttp://jira.openqa.org/browse Can somebody please help me with this? Thanks, Babitha- Hide quoted text - - Show quoted text - -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] click_no_wait again
Trust me. I have done my research. I know there were already many issues reported with element.click_no_wait and most of them are supposed to be fixed. But, I still have this problem with the latest version of watir. I am pretty sure with the same version of ruby it worked for me in another system, but as far as I can remember the watir version was an earlier one. My current ruby version is 1.86-26 p(111), watir -1.8.1 OS: Windows 7, IE 8. Here is the problem. I have a button on my page, clicking on which it displays a javascript confirmation dialog. I tried it with click() function, and it works fine. But, with click_no_wait() nothing happens, and the control just passes on to the next statement. Below is my code: $b = Watir::IE.attach(:url, myurl) sleep(2) btn = $b.button(:id, btnClear) $DEBUG = true btn.click_no_wait() $DEBUG=false My page does not use frames. As was suggested in some earlier questions, I put $DEBUG=true and $DEBUG=false statements around the click_no_wait call and below is what I got. #no_wait command: Exception `WIN32OLERuntimeError' at c:/ruby/lib/ruby/gems/1.8/gems/ watir-1.8.1/lib/watir/element.rb:208 - ruby -e $:.unshift('c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/ watir/win32ole').unshift('c:/ruby/lib/ruby/gems/1.8/gems/ commonwatir-1.8.1/lib').unshift('c:/ruby/lib/ruby/gems/1.8/gems/ firewatir-1.8.1/lib').unshift('c:/ruby/lib/ruby/gems/1.8/gems/ watir-1.8.1/lib');require 'c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/ lib/watir/core';Watir::Button.new(Watir::IE.attach(:hwnd, 591236), :unique_number, 4).click!(); OLE error code:0 in Unknown No Description HRESULT error code:0x80070057 The parameter is incorrect. c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/element.rb:58:in `assert_exists': Unable to locate element, using :unique_number, 4 (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/ element.rb:275:in `click!' from -e:1 I have gone through http://jira.openqa.org/browse/WTR-320 and http://jira.openqa.org/browse/WTR-459. Can somebody please help me with this? Thanks, Babitha -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: click_no_wait again
Finally, I found what the issue was. It is happening because I am using IE.attach to attach to the page instead of using browser.Start or browser.goto. With browser.goto things started working fine. Apparently the error message that was logged by the $DEBUG= true itself helped me. I saw that internally there is again a call to do an IE.attach, and I guessed that may be failing. Please see the relevant part of the error message below: Watir::Button.new(Watir::IE.attach(:hwnd, 591236), :unique_number, 4).click!(); On Jun 2, 1:50 pm, Babitha babitha.augus...@gmail.com wrote: Trust me. I have done my research. I know there were already many issues reported with element.click_no_wait and most of them are supposed to be fixed. But, I still have this problem with the latest version of watir. I am pretty sure with the same version of ruby it worked for me in another system, but as far as I can remember the watir version was an earlier one. My current ruby version is 1.86-26 p(111), watir -1.8.1 OS: Windows 7, IE 8. Here is the problem. I have a button on my page, clicking on which it displays a javascript confirmation dialog. I tried it with click() function, and it works fine. But, with click_no_wait() nothing happens, and the control just passes on to the next statement. Below is my code: $b = Watir::IE.attach(:url, myurl) sleep(2) btn = $b.button(:id, btnClear) $DEBUG = true btn.click_no_wait() $DEBUG=false My page does not use frames. As was suggested in some earlier questions, I put $DEBUG=true and $DEBUG=false statements around the click_no_wait call and below is what I got. #no_wait command: Exception `WIN32OLERuntimeError' at c:/ruby/lib/ruby/gems/1.8/gems/ watir-1.8.1/lib/watir/element.rb:208 - ruby -e $:.unshift('c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/ watir/win32ole').unshift('c:/ruby/lib/ruby/gems/1.8/gems/ commonwatir-1.8.1/lib').unshift('c:/ruby/lib/ruby/gems/1.8/gems/ firewatir-1.8.1/lib').unshift('c:/ruby/lib/ruby/gems/1.8/gems/ watir-1.8.1/lib');require 'c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/ lib/watir/core';Watir::Button.new(Watir::IE.attach(:hwnd, 591236), :unique_number, 4).click!(); OLE error code:0 in Unknown No Description HRESULT error code:0x80070057 The parameter is incorrect. c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/element.rb:58:in `assert_exists': Unable to locate element, using :unique_number, 4 (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/ element.rb:275:in `click!' from -e:1 I have gone throughhttp://jira.openqa.org/browse/WTR-320andhttp://jira.openqa.org/browse/WTR-459. Can somebody please help me with this? Thanks, Babitha -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: click_no_wait again
Ok I finally found what the issue was. It was due to the IE.attach that I am using in the code to attach to the page. Once I started using browser.goto, things started working fine. Apparently, the error message logged itself helped me identify the issue. I noticed that internally there is again a call to IE.attach when click_no_wait is called, and I guessed probably that is the issue. Please see the relevant part of the error message below: Watir::Button.new(Watir::IE.attach(:hwnd, 591236), :unique_number, 4).click!(); On Jun 2, 1:50 pm, Babitha babitha.augus...@gmail.com wrote: Trust me. I have done my research. I know there were already many issues reported with element.click_no_wait and most of them are supposed to be fixed. But, I still have this problem with the latest version of watir. I am pretty sure with the same version of ruby it worked for me in another system, but as far as I can remember the watir version was an earlier one. My current ruby version is 1.86-26 p(111), watir -1.8.1 OS: Windows 7, IE 8. Here is the problem. I have a button on my page, clicking on which it displays a javascript confirmation dialog. I tried it with click() function, and it works fine. But, with click_no_wait() nothing happens, and the control just passes on to the next statement. Below is my code: $b = Watir::IE.attach(:url, myurl) sleep(2) btn = $b.button(:id, btnClear) $DEBUG = true btn.click_no_wait() $DEBUG=false My page does not use frames. As was suggested in some earlier questions, I put $DEBUG=true and $DEBUG=false statements around the click_no_wait call and below is what I got. #no_wait command: Exception `WIN32OLERuntimeError' at c:/ruby/lib/ruby/gems/1.8/gems/ watir-1.8.1/lib/watir/element.rb:208 - ruby -e $:.unshift('c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/ watir/win32ole').unshift('c:/ruby/lib/ruby/gems/1.8/gems/ commonwatir-1.8.1/lib').unshift('c:/ruby/lib/ruby/gems/1.8/gems/ firewatir-1.8.1/lib').unshift('c:/ruby/lib/ruby/gems/1.8/gems/ watir-1.8.1/lib');require 'c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/ lib/watir/core';Watir::Button.new(Watir::IE.attach(:hwnd, 591236), :unique_number, 4).click!(); OLE error code:0 in Unknown No Description HRESULT error code:0x80070057 The parameter is incorrect. c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/element.rb:58:in `assert_exists': Unable to locate element, using :unique_number, 4 (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/ element.rb:275:in `click!' from -e:1 I have gone throughhttp://jira.openqa.org/browse/WTR-320andhttp://jira.openqa.org/browse/WTR-459. Can somebody please help me with this? Thanks, Babitha -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] SelectList javascript event handlers not firing when JQuery is used
Hello I have a selectlist on my page, which has a onchange event handler defined in JQuery. This event handler does not seem to be getting triggered when I use Watir to change the selectlist value. The behavior is pretty erratic. Sometimes the event handler is fired and sometimes it is not. I found a similar question asked in StackOverflow and the answer given was to use element.fire_event onclick or element.fire_event onchange. I tried this as well and still the behavior is unpredictable. For one value selected in the selectlist it works, but not for the other one. I have ruby 186-26, watir-1.6.7. IE 8 Is it a known issue? Is it fixed in the later version of Watir? thanks Babitha -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Watir simple field recorder
I know Watir community does not like recorders - I read about it in Wikipedia. This script is not exactly a recorder per say. I would call it a Object repository builder - if that appeals better to the Watir community. It helps you get around the mundane task of using Firebug or Developer tool bar to identify each element ids/names. Moreover, it is written in a very object oriented way. I have uploaded it at http://pastie.org/1837926. Thanks Darryl for that info. Željko, I suggest you try it. It will not solve your complex field identification problems where you still have to use Firebug/Developer Toolbar; but it will ease your development effort a lot; especially if you have a form based application with lots of data entry fields. Thanks Babitha On Apr 21, 1:46 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Fri, Apr 1, 2011 at 7:26 PM, Babitha babitha.augus...@gmail.com wrote: I could share this script if anybody was interested. But, I am not sure where I can upload it. You will find that Watir community does not like recorders. You can upload it on your site, github, or you can take over watir recorder project at openqa.org. Željko -- watir.com - community manager watir.com/book - author watirpodcast.com - host viaqa.mobi conference on software testing - organizer -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Watir simple field recorder
There was a ruby watir recorder written by Scott Hanselman(of Microsoft of course) a long time back. It was a full fledged recorder and like other recorders had the issue that the code generated couldn't be reusable. I made some small modifications to this so that it identifies the element IDs and wraps the element as a property in a module. Basically the format of the code generated would be as folows: module MyPage def first_name $browser.text_field(:id, FirstName) end def first_name $browser.text_field(:id, FirstName) end end -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Watir simple field recorder
A long time back, Scott Hanselman of microsoft had posted a ruby watir recorder in his blog. Like most other recorders, this had the problem that the code generated couldn't be reused. I made some small tweaking to this code so that when a user traverses through the page, clicking on each element that he wants to record, it records all the elements in the Watir format and gives back a nice module with properties defined for each element. As a sample say you have a page with two fields FirstName and LastName. The recorded output will be something like below: module MyPage def first_name $browser.text_field(:id, FirstName) end def last_name $browser.text_field(:id, LastName) end end Now just add this module to your test cases and use first_name, last_name etc directly without bothering about the identification of IDs. I could share this script if anybody was interested. But, I am not sure where I can upload it. Thanks, Babitha -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: click_no_wait not working for Checkbox
Try increasing the sleep time. When it works through IRB, but not in code, most often than not, the issue is related to timing. On Nov 30, 3:30 am, Deep dedeepya.kanipa...@gmail.com wrote: Hi, I need to clear the checkbox which gives a pop up with OK and Cancel buttons. Then I have to click on OK button to proceed. I have used the following code to clear the check box: Object.click_no_wait Sleep 40 To click on OK button on the pop up, code used is When /^clicks OK in the pop up box$/i do sleep 5 startClicker(browser, OK, 60) end Have the following method used for startClicker def startClicker(browser, button , waitTime = 9, user_input = nil) # get a handle if one exists hwnd = browser.enabled_popup(waitTime) if (hwnd) # yes there is a popup w = WinClicker.new if (user_input) w.setTextValueForFileNameField(hwnd, #{user_input}) end # I put this in to see the text being input it is not necessary to work sleep 3 # OK or whatever the name on the button is w.clickWindowsButton_hwnd(hwnd, #{button}) # # this is just cleanup w = nil end end Ruby Version: 1.8.6_26 Issue Description: click_no_wait , clears the check box and throws popup when tested through IRB. But the same is not working when i run the automated script. Can anyone provide your inputs here. Thanks much. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Watir tests - result reporting
Alastair, Stmbled on this: http://www.natontesting.com/2009/09/18/get-html-output-from-testunit-by-using-rspec/ Please see if it would work for you. Thanks, Babitha On Nov 13, 5:44 am, Alastair Montgomery doodl...@gmail.com wrote: Hi, Here is a small sample of the test scripts we are using at the moment, can you tell if there is much work required to change it to RSpec? require rubygems require logger require test/unit require watir require library/CSVRead require library/PARRead require library/Login require library/browseTree class WorkflowSelectorTest Test::Unit::TestCase def setup #Setup Variables myPAR = PARRead.new(001_parameters.txt) #Create log file $log = Logger.new(myPAR.logfile) $log.debug ===Initializing Test Setup=== testSite = myPAR.url title = myPAR.title #Choose Browser Watir::Browser.default = myPAR.browser #Start Test Run $log.debug ===Start=== $log.debug Goto web page, + testSite $browser = Watir::Browser.start(testSite) #Login tmp = Login.new($browser,myPAR.user,myPAR.password) $log.debug Test WebClient Title assert($browser.title.include? title) #Wait for jQuery to render Watir::Waiter.wait_until {$browser.label(:id,acms-ws-select- label).exists?} $log.debug Check workspace label assert($browser.label(:id, acms-ws-select-label).exists?) end def teardown $log.debug ===Test Teardown=== #TODO Logout when implemented in client if $DEBUG then #Do not close the browser puts Finished else $browser.close end $log.close end def testWorkflowSelector1 #Test choosing workspaces myData = CSVRead.new(data/testWorkflowSelector1.csv) workspaceName = myData.array $log.debug ===testWorkflowSelector1=== $log.debug Test choosing workspaces $log.debug Select workflow dropdown check assert($browser.select_list(:id, ACMS-Workspace-Selector)) $log.debug Change workflow dropdown check dropDown = $browser.select_list(:id, ACMS-Workspace-Selector) i=0 while i workspaceName.length dropDown.select workspaceName[i][0] dropDown.set workspaceName[i][0] assert_equal(dropDown.value,workspaceName[i][0]) i+=1 end $log.debug ===testWorkflowSelector1=== end end Regards, Alastair On Nov 12, 1:40 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Fri, Nov 12, 2010 at 12:44 PM, Alastair Montgomery doodl...@gmail.com wrote: Do you need to do any changes to your test scripts to run them with RSpec? It depends. :) If you provide some sample code I could change it to use RSpec. Željko- Hide quoted text - - Show quoted text - -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Watir tests - result reporting
Željko, Thanks for your replies. But, isn't there any solution that would give an excel report? HTML report, even if color coded, I don't think is easy to run through. Thanks, Babitha On Nov 15, 5:16 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Sat, Nov 13, 2010 at 12:44 PM, Alastair Montgomery doodl...@gmail.com wrote: Here is a small sample of the test scripts we are using at the moment, can you tell if there is much work required to change it to RSpec? I think Dave ported it pretty god to RSpec. Let me know if you have further questions. Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Watir tests - result reporting
Hi, I am new to Watir, and we are evaluating Watir as a tool to replace Qtp. One place I am stuck a little bit is regarding reporting the errors at the end after all the test suites are done. I have looked at various options those are discussed in the Watir community, examples and blogs. i started with Html reports from the examples, tweaked the code to make the interface simpler - but found it to be still not simple enough. Then I looked at Test::Unit. The problem I find with Test::Unit is that the output is in free text format, and consolidating the results is a pain. Please note we are not Agile practionitners. We are looking at Watir as a testing tool for the testers - not for the developers. We do not use BDD, so tools like Cucumber or RSpec probably will not suite us. Also, I found even Rspec gives its output as free text format. I am sure there must be a better simpler way. Probably I am just not able to find any pointers towards it. What I am looking at is a solution that will write the results to a simple excel/csv file. I thought the Test::unit in itself could be extended to do this, when any assertion passes or fails. I thought this must be a simple thing to do, and probably somebody has already done it. I also read in the Test::Unit documentation that Observers can be added to Test::Unit TestResult. Is there any sample implementations of this which will write it to an excel/csv as I mentioned above? Your help will be greatly appreciated. Thanks, Babitha -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com