Srivastava
Srivastava

Reputation: 3578

Does WatiNTestRecorder generates C# equivalent code or only the object formatted into model

Does WatiNTestRecorder generates C# equivalent code or only the object formatted into model.

There are different sites showing different snapshots

Please follow the link where the first one says like code is not in specific language but in objects formatted into models

http://watintestrecord.sourceforge.net/

But the second one shows a snapshot where c# code is generated in the watin test recorder

http://weblogs.asp.net/dixin/archive/2009/02/05/automated-web-testing-1-using-watin.aspx

Please tell which is correct

Upvotes: 0

Views: 392

Answers (3)

Bogdan
Bogdan

Reputation: 1393

This generates a C# code - http://fwptt.sourceforge.net/, I still have to accommodate for nonforms authentification but since you'll have full access to the generated code you can customize it for different authentifications if needed.

Upvotes: 0

OCary
OCary

Reputation: 3311

Using the latest beta of WatiN Test Reporder (2.0.9.1228), in the "save" dialog you can pick what language and testing framework (NUnit, etc) you want. The "save" dialog is access via the Test Source tab and in the dialog select the language/test framework you want via the "Save as type" dropdown list. You can also save it (the default) in the recorder's XML format so you can open it in the recorder again later. The recorder cannot open and interpreter saved C#/VB.NET source files. I believe an earlier version of the recorder would only generate C# code so that may be the screenshot on your second link.

Once the file is saved, take the source to your editor of choice, add Asserts, modify as needed, compile and ten run in your test runner of choice.

For me using Test Recorder (2.0.9.1228) and WatiN 2.1 the "compile" option in the recorder does not work (note: I have no plans to dig into getting it to work). If I were to use the recorder I'd use it as a helper only and then add the resultant source code to my Visual Studio project.

Upvotes: 1

wimh
wimh

Reputation: 15232

Instead

IE ie = new IE();
// point it to http://www.google.com
ie.GoTo("http://www.google.com");

try this:

IE ie = new IE("http://www.google.com");

And make sure your project is x86 and not Any CPU.

Upvotes: 0

Related Questions