# Way to rexpect on windows

**URL:** <https://rubytalk.org/t/way-to-rexpect-on-windows/24474>\
**Category:** ruby-talk\
**Created:** [31 January 2006 12:41 UTC](https://rubytalk.org/t/way-to-rexpect-on-windows/24474 "2006-01-31T12:41:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manish\_Sapariya2](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@Manish\_Sapariya2](https://rubytalk.org/u/Manish_Sapariya2)\
**Post date:** [31 January 2006 12:41 UTC](https://rubytalk.org/t/way-to-rexpect-on-windows/24474/1 "2006-01-31T12:41:26Z")

</div>

Hi List,  
I am using ruby mostly for running my watir (Web automation  
tool written in ruby) scripts. However in this process I need  
to login to unix box and carry out some task before proceding  
with my test.

I could find rexpect module but it seems that works only on  
\*nix and not on windows.

I am not sure whether rexpect can work on windows. Can somebody  
confirm? If rexpect is not the way, what would be solution  
for login on to unix box and run some scripts there?

I also tried using cygwin on windows, but I am not sure how can  
I run my watir scripts on cygwin along with rexpect?

Is this possible?  
Any help in this regard will be appreciated.  
Thanks and Regards,  
Manish

---

<div class="post-metadata">

**Author:** ![M\_Edward\_Ed\_Borasky1](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@M\_Edward\_Ed\_Borasky1](https://rubytalk.org/u/M_Edward_Ed_Borasky1)\
**Post date:** [1 February 2006 15:06 UTC](https://rubytalk.org/t/way-to-rexpect-on-windows/24474/2 "2006-02-01T15:06:29Z")

</div>

I'm pretty sure there's a "native" port of "expect" to Windows, if that helps. Are you running "ActiveState" Tck/Tk or some other version?

Does "rexpect" run under CygWin? I've never tried it, but I'm pretty sure the CygWin Tcl/Tk/expect works fine on Windows. And if you (or someone else) figures out how to start up Internet Explorer (or for that matter, Excel) from CygWin, I'd like to know -- it would be quite useful.

Manish Sapariya wrote:

> **···**
>
> > Hi List,  
> > I am using ruby mostly for running my watir (Web automation  
> > tool written in ruby) scripts. However in this process I need  
> > to login to unix box and carry out some task before proceding  
> > with my test.
> > 
> > I could find rexpect module but it seems that works only on  
> > \*nix and not on windows.
> > 
> > I am not sure whether rexpect can work on windows. Can somebody  
> > confirm? If rexpect is not the way, what would be solution  
> > for login on to unix box and run some scripts there?
> > 
> > I also tried using cygwin on windows, but I am not sure how can  
> > I run my watir scripts on cygwin along with rexpect?
> > 
> > Is this possible?  
> > Any help in this regard will be appreciated.  
> > Thanks and Regards,  
> > Manish
> 
> --  
> M. Edward (Ed) Borasky
> 
> [http://linuxcapacityplanning.com](http://linuxcapacityplanning.com)
