Deployment via Repository Client

The following example shows how to deploy a robot and a type from the local file system using the RepositoryClient

string user = "test";
string password = "test1234";
RepositoryClient client = new RepositoryClient("http://localhost:50080", user, password);

byte[] robotBytes = File.ReadAllBytes("c:\\MyRobots\\Library\\Test.robot");
byte[] typeBytes = File.ReadAllBytes("c:\\MyRobots\\Library\\Test.type");

// we assume that no one has deleted the Default project
client.deployRobot("Default project", "Test.robot", robotBytes, true);
client.deployType("Default project", "Test.type", typeBytes, true);
            

Deploying to Repository