Tuyet Cong-Ton-Nu wrote:

Some questions came up during a demo of WATIR.

Our automation team would like to know whether WATIR can do the following functions:

 

1.       Launch external applications from a test script such as Excel, Word, etc.

2.       Include variables, functions, web/window declarations and/or additional test cases from other test scripts (E.g. – “uses”, “script:”)

3.       File I/O (E.g. – Logging, test input/output data, expected results, etc.)

4.       Exception handling (WATIR errors distinguished from system or OS errors)

5.       Customizable result states (E.g. – warnings)

6.       Command line support (launch, quit, run one, run multiple, output)

7.       Access & scope declarations (private, public, protected, friend, etc.)

8.       Integrates & interacts directly w/ desktop applications & Operating System on some level (command line? Process id? Can it tell the OS of the machine running WATIR is Win2K or XP, etc.)

9.       Change script to trap System Error when table is not accessible

10.   Investigate launching 2 scripts at the same time (use two different instances of IE)

 

I believe most of the answers are YES, but I am not sure about 4, 8 & 9.  Your answers are appreciated.  Thanks.


_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
Ok,

#1 - Understand that WATiR is simply a library for Ruby ... since your scripts are all ruby programs you have access to everything Ruby can get to ... Ruby under Windows has the Win32Ole library which means it can talk with any COM enabled application.

#2 - Again, scripts are Ruby based, you can pull functionality from multiple files together as well as database connectivity, command-line arguments, environment variables, etc.

#3 - ... same answer, Ruby has File I/O.

#4 - Yes, WATiR has it's own exception mechanisms that wrap application exceptions from Internet Explorer.

#5 - ... I guess I need more specifics about what you are looking for.   Programs have exit values just like a C application.  Ruby also has a built in logging class that allows for differing levels of information to all be output to the same file... Warnings vs Errors vs Informational messages.  Ruby also has built in support in the standard object library for xUnit style test case and test suite objects.

#6 - ... I guess I need more specifics on this one too... You can kick off ruby scripts or, if you installed from the one-click installer, you can simply double click a script to run it.  As far as run-one, run-all, etc ... well, that's up to whatever command-line options you program into your applications.  But, again, fully-featured programming language, you should find everything you are looking for.

#7 - Ruby has access specifiers and an Object inheritance model that should be more than sufficient for you, it even implements some things ( like mix-ins ) that you probably aren't used to.

#8 - Ruby has access to the running environment which provides information about the running version of windows. You can run separate programs as separate processes ( child or otherwise ).

#9 - Ruby has exception handling and you can simply wrap the call attempting to access a specific table/whatever with that error-handler and watch for the error that is raised when that situation occurs.

#10 - Yes, WATiR supports multiple distinct IE processes... Each invocation of IE.new creates a new/distinct window.

Let me know if I didn't answer any of your points to your satisfaction.


j.


_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to