Silk4j - how to connect to remote machine and start application there?

601 views Asked by At

I have been using SilkTest for long time now, in 4Test connecting to remote machines and working on remote applications was so smooth. I have recently started to look at Silk4J (SilkTest 15.5) and trying to do remote connect and start some applications, so far unable to do.

I used Desktop remoteDesktop = new Desktop("remoteMachineName") to connect to remote machine but now stuck on starting applications there.

Any help here would be really helpful

1

There are 1 answers

1
tehlexx On BEST ANSWER

With creating a Desktop instance for the remote machine you've done the first step.

Next you'll need to specify which application you want to test. Both locally and remotely how you do this is with a Basestate.

For example, assume you'd want to test notepad:

Desktop remote = new Desktop("remoteMachineName");
BaseState base = new BaseState("notepad.exe", "//Window[@caption='*Notepad']");
Window notepad = base.execute(remote);

Alternatively, you can set up a configuration for your project in the IDE integration by going to Silk4J > Configure applcations... and select Notepad. Then the code would look like this:

Desktop remote = new Desktop("remoteMachineName");
BaseState base = new BaseState();
Window notepad = base.execute(remote);