Re: [Wtr-general] regex url
Bret wrote You can also just use Regexp.escape() in IRB to see what would be escaped and therefore what special characters are in your string. irb Regexp.escape javascript:PC_7_0_G6_selectTerritory('1',%20'select') = javascript:PC_7_0_G6_selectTerritory\\('1',%20'select'\\) Nice. I'll put it in the Watir FAQ's today. Any idea why we are given two escape slashes, instead of one? Might write a little compare between Java\Rational Functional Tester regex v Ruby\Watir. aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] regex url
Hi, I am having difficulties using regex and clicking on a link. the full link is: javascript:PC_7_0_G6_selectTerritory('1',%20'select') the regex I am using is: $ie.link(:url, /javascript.*selectTerritory('1',%20'select')/).click and I receive an UnknownObjectException thanks aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] assert_false
Hi, As you may know Test::Unit does ! include an assert_false. I got this from the CLR archives. Enter this in assertations.rb public def assert_false(boolean, message=) _wrap_assertion do assert_block(assert should not be called with a block.) { !block_given? } assert_block(message) { !boolean } end end test example regex = /Joe.*Bloggs/ assert_false($ie.contains_text(regex), #{regex} unexpectedly found in HTML) aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Parameterization of data in the watir
We are using watir in our project, and we want to do the Parameterization for few things in the script using excel sheet. Before I run my tests, I input test data through the GUI, using a CSV. Here is some code, but a pretty simple thing to do. def enter_employees() ObjectMap.new.instance_eval do File.open('C:\auto_tests\test_data\employee_data.csv','r') {|f| #use block so file is automatically closed f.each_line { |line| next if /^;/ =~ line #check for ';' at start of line i = 0 line.chomp.split(',').each{|x| i += 1 next if x.nil? or x == null #skip nil or null values case i when 1 #country employee_country_id.select(x) when 2 #depot employee_depot_id.select(x) when 3 #first_name employee_first_name.set(x) when 4 #last_name employee_last_name.set(x) when 5 #user_id employee_user_id.set(x) when 6 #stream_id employee_stream_id.select(x) when 7 #time percentage employee_role.set(x) when 8 #tel employee_telephone.set(x) when 9 #e-mail employee_email.set(x) when 10 start_date.set(x) when 11 end_date.set(x) end puts #{x} has been input } #click_submit #if $ie.contains_text('There is a problem with the employee');click_submit;end click_new_employee_link } } end end If you wanna connect directly to Excel, I will post some smaple code. aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] report failure question?
the problem is that when I put 'rescue=e' statement I catch exception and report shows that test pass If you rescue the exception is it not swallowed up? do you then not need to invoke the exception message and the stacktrace? rescue = e p e.message p e.backtrace and then deal with the exception in some way? Aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Towards Automated Test Framework Using Ruby and Watir
Hi, I have started a blog on Watir. http://www.agiletester.co.uk/ The formatting isn't done as yet, and there is still much to add. Cheers aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] test_output
Hi Charley, You can also define your own assertions using assert_block. assert_block Couldn't do the thing do do_the_thing end I am looking at the test unit assertion.rb at the moment, but I don't fully understand what you are getting at here. Could you elaborate, please? Aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Paramatrization of the data in WATIR
There are couple of us working towards a framewok here which includes connections to Oracle and Excel. I'll start writing a blog from today and let you know the URL. Cheers aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] logging a msg to TEST::UNIT
Hi, Can we log a message to TEST::UNIT independent of an assertion or a 'flunk'? Cheers aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Reading XML using watir/ruby
Can anyone tell me, how to read XML file using watir/r Use REXML http://www.germane-software.com/software/rexml/ aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] verify html list and that that list is in sequential order
Hi, I have a list UL LIHINCKLEY/LI LIHINDHEAD/LI LIHINTON ST GEORGE/LI /UL Is it possible to verify the contents of the list elements in sequential order and that nothing else is in this list. Bit of a tricky one I think! Cheers Aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] ruby_testing_techniques
Hi, The London Ruby User Group have hoisted up a site of Ruby presentations. Two that may be of interest to us are: 1) ruby_testing_techniques 2) ruby_dsl_presentation_tiest_2006 http://svn.lrug.org/lrug_sandbox/presentations/ aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] ie.back
HI, The version of watir is shown in the err msg below. The browser is definitely going back to the previous HTML page, yet I receive this exception: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1054/./watir.rb:1500:in `method_missing': GoBack (WIN32OLERuntimeError) Should I catch the exception or choose a different method? (sorry if this has been briefed, but I cannot access the internet at the moment) Cheers Aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] AWESOME Ruby Hacks
Hi, Thanks for the links, but is it possible to syntax highlight in the IRB cmd shell through IRBC?. Can't see anything in pickaxe. Aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Handling of the Mouse Over using watir
In my application the user needs to do mouseover to do some functionality Can't you send a WM_MOUSEMOVE message? aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] retrieve data from a specific tags
Hi, Is it possible to retrieve data from specific tags? For example I just want to pull out the textual node from this: div class=tnt-view-part-errorsdiv class=tnt-errorThe user is assigned to territories after the specified end date/div/div Cheers Aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] RegEx 151.1054
I think we got a problem with RegEx watir 151.1054 this'll work fine def password_field;$ie.text_field(:name, 'password');end this def password_field;$ie.text_field(:name, /password/);end rurturned on error of test failed: \nOLE error code:0 in Unknown\n No Description\n HRESULT error code:0x80010108\n The object invoked has disconnected from its clients. [c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1054/./watir.rb:3863:in `method_missing', c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1054 /./watir.rb:3863:in `doKeyPress', Why am I using RegEx? Cos in different environments my objects may have different prefixes or suffixes Cheers aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] retrieve data from a specific tags
Zeljko wrote: ie.div(:class, tnt-error).text top dollar. aidy _ --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Newbie - Ruby dev IDE question
I use Arachno Ruby (http://ruby-ide.com/ruby/ruby_ide_and_ruby_editor.php ). Take a look. supports only 1.8.2. and the beta for 1.8.4 ([for me] kept crashing). Would like peoples experience on Rad Rails though. aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Newbie - Ruby dev IDE question
I have ruby 1.8.4 and official version of Arachno works at my windows machine But there is no de-bugging with this version and 1.8.4. Am I correct in saying that? aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Newbie - Ruby dev IDE question
What happens when you start debugger? Nothing? Crashes. But the last time I used it was over a month ago. Aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Keyword Framework UI
Chris Wrote: a) make it open-source. Otherwise it's too hard to answer questions about it. The CSDDT is open source, simple, agile and easy to use. b) write in Ruby, because that's what the people using the framework will be using. Will all be in Ruby; the good thing about Ruby (unlike Java) is that it can directly interface to COM and manipulate the Excel API (i.e. export spreadsheets to txt files) c) please make an effort to answer ongoing questions about your work,either on this list or on a list devoted to the framework itself. Not a problem. I'll use this list. And it will be iterative development: I would imagine the software will change dramatically with collaborative input. Will start next week. aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Keyword Framework UI
The CSDDT is open source, simple, agile and easy to use. Is it already available to use? It sounds like it is already available to use. The CSDDT is open-source, I made amendmentts to it under the name of Adrian Rutter. It is writen in BASIC. I am going to convert that code to Ruby. http://www.scionlabs.com/using_rational_robot.zip Aidy ps. can someone give me a job at ThoughtWorks? --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Keyword Framework UI - OT
Bret wrote Thanks for the heads up that you are using two different names on this list. I thought you were two different people. I changed my surname recently because of family problems. Aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Keyword Framework UI
Bret wrote People interested in CSDDT may want to take a look at Just Enough Software Test Automation, which contains a 50-page chapter on the framework The original CSDDT and code and my changes with a full explanatory word-document should be on the Rational Users site. http://groups.yahoo.com/group/RationalUsers/ I spoke to Bruce Posey about a week ago, and he was happy with me converting it to Ruby. However, I think I have much better ideas to improve the CSDDT. The CSDDT was half-there. Bruce would probably agree. Aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Keyword Framework UI
Bret wrote, Have you compared the Posey data driven framework with the Nagle data driven framework? (http://safsdev.sourceforge.net) Has anyone? I would like to know how they compare. [this has gotta be quick cos gotta go] The CSDDT is tied to the test-tool, it is simple and fast; but you need to write your own functions. Excel sheets get exported to txt files and read by the tool. You make up your own keywords. SAFS is tool and 'application' independent,though certainly with for example Robot it can be too slow because of lengthy switch statements. With minor changes you could use the same sheets for Winrunner, RFT, Robot, Abbot etc. Carl has two sheets one for the business analysts\test designers (high level), and low level sheets for test automators. You can use SAFS out of the box - the keywords are there (http://safsdev.sourceforge.net/sqabasic2000/RRAFSReference.htm). I have taught a graduate in a morning how to construct automated tests without knowledge of the tool or programming. But it must be a collaborative effort to really work. Carl mentioned last week that the TID driver with RFT was much faster than using the Robot driver. SAFS uses an IBM STAF service that can alllow data exchange between processes, so you can use more than one tool at the same time. The situation however is that test-tools will soon be open-source, so we will not be at the mercy of vendors as the SAFS team have been for over a decade. aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Keyword Framework UI
What do u mean by CSDDT? Control Synchronized Data-Driven Testing written by Bruce Posey and outlined in the book 'Just Enough Software Test Automation' I amended it to make it more at the atomic level. Have a look at the link I sent you. aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Keyword Framework UI
Control Synchronized Data Driven Testing (CSDDT) Bruce wrote it, I amended it. The document I wrote on it is here http://www.scionlabs.com/using_rational_robot.zip The framework is simple and portable (agile? I think). Spoke to Bruce and he is very interested in Watir. I am CC'ing him on this e-mail. aidy --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Fw: was (thanks for the help) now SYSTIR
Michael Bolton wrote aidy If there was a way to use Ruby to test Java and old win32 mb Check out SYSTIR. mb http://atomicobject.com/systir.page I cannot see for the life of me how SYSTIR could help to test legacy win32. The only thing I could think of is embed C in Ruby, to integrate with an application's process. With Java we could use JRuby to utilise the Robot class aidy ps have you seen the film 'Office Space'? --- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. --- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general