Expect for .NET

Expect for .NET is a .NET library which ports of expect scripts functionality. The library is distributed under The MIT License.

Source code can be found on GitHub: https://github.com/wiwanek/Expect.NET

The latest version is available on NuGet: https://www.nuget.org/packages/Expect.NET/

Tutorial how to use Expect for .NET: https://github.com/wiwanek/Expect.NET/wiki/Expect.NET-Tutorial

List of blog posts about Expect for .NET: http://blog.iwanek.eu/category/expect-net/


10 thoughts on “Expect for .NET

    • Hi!
      Sure. I can release version 2.0.0 with removed case sensitive problems. I wasn’t aware that VB is not case-sensitive 😮

      Could you send me some code example in VB (something simple like spawning cmd.exe and sending command ‘dir’) so I can test it before release?


  1. Hello!
    Is it possible to just attach Expect to any process? If I do so like
    Process proc = Process.Start(“cmd.exe”);

    ISession session = Expect.Expect.Spawn(new Expect.ProcessSpawnable(server));

    It creates new instance of cmd.exe…
    Thank you!

    • ISession session = Expect.Expect.Spawn(new Expect.ProcessSpawnable(proc));

      Sorry, my mistake 😀

  2. Ok, solved 😀 Sorry for spamming.
    Process proc = new Process();
    proc.StartInfo = new ProcessStartInfo(“cmd.exe”);

    ISession session = Expect.Expect.Spawn(new Expect.ProcessSpawnable(proc));

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>