List of usage examples for org.openqa.selenium.net Urls urlEncode
public static String urlEncode(String value)
From source file:com.thoughtworks.selenium.DefaultRemoteCommand.java
License:Apache License
public String getCommandURLString() { StringBuffer sb = new StringBuffer("cmd="); sb.append(Urls.urlEncode(command)); if (args == null) return sb.toString(); for (int i = 0; i < args.length; i++) { sb.append('&'); sb.append(Integer.toString(i + 1)); sb.append('='); sb.append(Urls.urlEncode(args[i])); }//from ww w.ja va 2 s. c o m return sb.toString(); }
From source file:com.thoughtworks.selenium.HttpCommandProcessor.java
License:Apache License
private String buildCommandBody(String command) { StringBuffer sb = new StringBuffer(); sb.append(command);//from w ww.jav a 2s . c om if (sessionId != null) { sb.append("&sessionId="); sb.append(Urls.urlEncode(sessionId)); } return sb.toString(); }