repeats / Repeat

Cross-platform mouse/keyboard record/replay and automation hotkeys/macros creation, and more advanced automation features.
Apache License 2.0
1.03k stars 76 forks source link

How can I embed the Java script I have recorded into my project? #45

Closed zziyan closed 1 year ago

zziyan commented 1 year ago

Thank you, author. Thank you for your project. However, I have a question. How can I embed the Java script I have recorded into my project?

I'm not sure how to run CustomAction, and I'm also unsure how to construct the core.

My project is a GUI automation testing project for Windows. I use Repeat to record Java scripts, and I would like to run them in my project.

Thank you. Please help me answer these questions.

hptruong93 commented 1 year ago

Have you read the wiki page (https://github.com/repeats/Repeat/wiki/Getting-started)?

In particular, in the Record and Replay section (https://github.com/repeats/Repeat/wiki/Getting-started#record--replay), there's instruction on how to generate the source code "To generate source code out of a recorded action, choose Tools --> Generate source on the top right drop down menu."

zziyan commented 1 year ago

Hello, Thank you for your response.

after generating the source code, I copied it to my project, but I don't know how to run it. Is there a way to run the generated source code without using Repeat? The generated code is in Java. I will record my testing process, but currently, I can only replay the actions in Repeat. I'm unsure how to execute the generated source code in my project.

hptruong93 commented 1 year ago

I think you figured it out. Here's my comment in case it helps.

If you want to run the generated source code, it's best to have the Repeat program running. You can trigger the task execution externally using a key chain, or if you prefer a more machine friendly way, you can use shared variable (https://github.com/repeats/Repeat/wiki/Shared-variables) and the CLI (https://github.com/repeats/Repeat/wiki/Command-Line-Interface-%28CLI%29) to trigger the execution when you need to.