Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 791
Surendra Parchuru Avatar asked May 09 '26 15:05

Surendra Parchuru


1 Answers

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:

  • Read a file in Node.js
like image 123
alecxe Avatar answered May 12 '26 05:05

alecxe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!