Search code examples
javascriptprotractorautoit

How to call AutoIt functions from a Protractor script?


I need to call AutoIt functions from a Protractor script (to open Notepad and copy its text, because I am not able to do so using just a Protractor script).

How to call AutoIt functions from a Protractor script?


Solution

  • Instead of opening the notepad and copying a text from it (which itself introduces a dependency and make the testing much less reliable), read the file directly from javascript (you can do it in, for example, onPrepare() function in your protractor config) - fs module should help here, see: