This is a problem of registering the dll file, and hence it create an object of AutoIt. To register the autoit dll from command prompt, use following command
1.regsvr32 C:\ruby192\lib\ruby\gems\1.9.1\gems\watir-1.8.1\lib\watir\AutoItX3.dll
Although it does call the register code before creating an object, the
error was in creating an autoit object.
2.You can also try adding line to top of the file
require 'win32ole'
This comment has been removed by the author.
ReplyDeletegetting below error
ReplyDeleteThe module ****** was loaded but the call to Dllregisterserver faild with error code
you have to do it as Administrator
ReplyDelete