public class Helper extends Object
| 构造器和说明 |
|---|
Helper() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> BrowserListenerWrapper<T> |
addEventListener(EventEmitter emitter,
String eventName,
DefaultBrowserListener<T> handler) |
static void |
chmod(String path,
String perms) |
static ExecutorService |
commonExecutor() |
static CompletionService |
completionService() |
static void |
copyProperties(Object src,
Object dest) |
static String |
createProtocolError(com.fasterxml.jackson.databind.JsonNode node) |
static String |
evaluationString(String fun,
PageEvaluateType type,
Object... args) |
static Set<DefaultBrowserListener> |
getConcurrentSet() |
static String |
getExceptionMessage(ExceptionDetails exceptionDetails) |
static boolean |
isFunction(String pageFunction)
判断js字符串是否是一个函数
|
static boolean |
isLinux()
Returns true if the operating system is a form of Linux.
|
static boolean |
isMac()
Returns true if the operating system is a form of Mac OS.
|
static boolean |
isNumber(String s) |
static boolean |
isString(Object value) |
static boolean |
isWin64()
是否是win64
|
static boolean |
isWindows()
Returns true if the operating system is a form of Windows.
|
static String |
join(String root,
String... args) |
static String |
paltform() |
static Object |
readProtocolStream(CDPSession client,
String handler,
String path,
boolean isSync)
read stream from protocol : example for tracing file
|
static void |
releaseObject(CDPSession client,
RemoteObject remoteObject,
boolean isBlock) |
static void |
removeEventListeners(List<BrowserListenerWrapper> eventListeners) |
static Object |
valueFromRemoteObject(RemoteObject remoteObject) |
static Object |
waitForEvent(EventEmitter eventEmitter,
String eventName,
Predicate predicate,
int timeout,
String abortPromise) |
public static String createProtocolError(com.fasterxml.jackson.databind.JsonNode node)
public static boolean isWindows()
public static boolean isMac()
public static boolean isLinux()
public static final boolean isWin64()
public static final String paltform()
public static final void chmod(String path, String perms) throws IOException
IOExceptionpublic static final Object readProtocolStream(CDPSession client, String handler, String path, boolean isSync) throws IOException
client - CDPSessionhandler - 发送给websocket的参数path - 文件存放的路径isSync - 是否是在新的线程中执行IOException - 操作文件的异常public static String getExceptionMessage(ExceptionDetails exceptionDetails)
public static final Set<DefaultBrowserListener> getConcurrentSet()
public static final <T> BrowserListenerWrapper<T> addEventListener(EventEmitter emitter, String eventName, DefaultBrowserListener<T> handler)
public static final void removeEventListeners(List<BrowserListenerWrapper> eventListeners)
public static final boolean isString(Object value)
public static final boolean isNumber(String s)
public static Object valueFromRemoteObject(RemoteObject remoteObject)
public static void releaseObject(CDPSession client, RemoteObject remoteObject, boolean isBlock)
public static final void copyProperties(Object src, Object dest) throws IntrospectionException, InvocationTargetException, IllegalAccessException
public static Object waitForEvent(EventEmitter eventEmitter, String eventName, Predicate predicate, int timeout, String abortPromise) throws InterruptedException
public static final String evaluationString(String fun, PageEvaluateType type, Object... args)
public static final ExecutorService commonExecutor()
public static final CompletionService completionService()
public static final boolean isFunction(String pageFunction)
pageFunction - Copyright © 2020. All rights reserved.