@@ -0,0 +1,2997 @@
+public class CaptureNEW %7B%0A%0A  public static String CaptureUrl = %22http://captureUrl:5000%22;%0A%0A  public static void newInstance(Command cmd, WebDriver webdriver) %7B%0A    newInstance(cmd, webdriver, null);%0A  %7D%0A  %0A  public static void newInstance(Command cmd, WebDriver webdriver, final String stacktrace) %7B%0A    Driver driver = webdriver instanceof Driver ? (Driver) webdriver%0A        : new Driver(webdriver)%0A        %0A    final String url = driver.getCurrentUrl();%0A    final String node = driver.getNodeAddress();%0A    final String screenshot driver.captureScreenShot()%0A    %0A    final Properties props = Context.get();%0A    %0A    try %7B%0A      new Capture(props.getTestName(), props.getUniqueExecutionID(),%0A                  props.getUser(), cmd, props.getApplicationName(),%0A                  props.getApplicationVersion(), props.getBrowserName(),%0A                  props.getBrowserVersion(), irl, node, screenshot, stacktrace);%0A    %7D%0A    catch (JSONExceptione )%0A    %7B%0A      e.printStackTrace();%0A    %7D%0A  %7D%0A  %0A  public Capture(final String testID, final String exID, final String user,%0A                  final Command cmd, final String sutName, final String sutVer,%0A                  final String browserName, final String browserVer,%0A                  final String url, final String node, final String screenshot,%0A                  final String stacktrace) throws JSONException %7B%0A              final JSONObject obj = new JSONObject();%0A              %0A              obj.put(%22testID%22, testID);%0A              obj.put(%22exID%22, exID);%0A              obj.put(%22user%22, user);%0A              obj.put(%22cmd%22, cmdObj(cmd));%0A              obj.put(%22sut%22, sutObj(sutName, sutVer));%0A              obj.put(%22browser%22, browserObj(browserName, browserVer));%0A              obj.put(%22url%22, url);%0A              obj.put(%22node%22, node);%0A              obj.put(%22ss%22, screenshot);%0A              %0A              if (null != stacktrace) %7B%0A                obj.put(%22stacktrace%22, stacktrace);%0A              %7D%0A              %0A              send(obj);%0A    %7D%0A    %0A    private JSONObject browserObj(String browserName, String browserVer)%0A          throws JSONException %7B%0A      final JSONObject obj = new JSONObject();%0A      %0A      obj.put(%22name%22, browserName);%0A      obj.put(%22ver%22, browserVer);%0A      %0A      return obj;%0A    %7D%0A    %0A    private JSONObject sutObj(String sutName, String sutVer)%0A          throws JSONException %7B%0A      final JSONObject obj = new JSONObject();%0A      %0A      obj.put(%22name%22, sutName);%0A      obj.put(%22ver%22, sutVer);%0A      %0A      return obj;%0A    %7D%0A    %0A        private JSONObject cmdObj(final Command cmd)%0A          throws JSONException %7B%0A      final JSONObject obj = new JSONObject();%0A      %0A      obj.put(%22action%22, cmd.getAction());%0A      obj.put(%22action%22, cmd.getUsing());%0A      obj.put(%22action%22, cmd.getValue());%0A            %0A      return obj;%0A    %7D%0A    %0A    private void send(JSONObject obj) %7B%0A      given().contentType(ContentType.JSON).and().body(obj.toString()).then()%0A        .post(CaptureUrl + %22/screenshot%22);%0A    %7D%0A%7D    %0A

Create CaptureNEW.java