jarmo / RAutomation

RAutomation
MIT License
100 stars 33 forks source link

Runtime Erro #105

Closed moklasurrahman11 closed 6 years ago

moklasurrahman11 commented 8 years ago

Hello, I am using this gem for my project. It worked fine when I instilled it. After few days when I re-run my scripts then it gave me this error message. I am not sure how can I fix this issue. Error messages that I got is as follow: [WARN] RAutomation AutoIt adapter is DEPRECATED and will be removed in the future!

RuntimeError: Start Ruby with administrative rights when using AutoIt adapter for the first time.

Any kind of help would be appreciated. Here is my scrript:

window = RAutomation::Window.new(:title => /Enter name of file to save to/i) window.activate puts window.exists? # => true sleep 2 window.send_keys(:tab) window.send_keys(:enter)

jarmo commented 8 years ago

Hello!

It seems that you want to try AutoIt adapter for some reason, which is deprecated (although works). If you want to use that, then you need to run script with administrator rights for the first time to register dll-s in the system required for AutoIt.

The question is though, why do you want to use AutoIt adapter? Is there anything missing in the default adapter?

Since it doesn't show in code, then I guess you have an environment variable called _RAUTOMATIONADAPTER set. Just remove it and start using default adapter instead. Or do the trick with running administrative privileges as stated above.

jarmo commented 6 years ago

Closing this due to inactivity.