public class ElementHandle extends JSHandle
| 构造器和说明 |
|---|
ElementHandle(ExecutionContext context,
CDPSession client,
RemoteObject remoteObject,
Page page,
FrameManager frameManager) |
createJSHandle, dispose, dispose, evaluate, evaluateHandle, executionContext, getContext, getDisposed, getProperty, jsonValue, setContext, setDisposed, toStringpublic ElementHandle(ExecutionContext context, CDPSession client, RemoteObject remoteObject, Page page, FrameManager frameManager)
public Map<String,JSHandle> getProperties()
getProperties 在类中 JSHandlepublic ElementHandle asElement()
public Frame contentFrame()
public void scrollIntoViewIfNeeded()
public String screenshot(ScreenshotOptions options) throws IOException, ExecutionException, InterruptedException
public BoxModel boxModel()
public int computeQuadArea(List<ClickablePoint> quad)
public void intersectQuadWithViewport(List<ClickablePoint> quad, int width, int height)
public ElementHandle $(String selector)
public List<ElementHandle> $x(String expression)
public Object $eval(String selector, String pageFunction, PageEvaluateType type, Object[] args)
public Object $$eval(String selector, String pageFunction, PageEvaluateType type, Object[] args)
public List<ElementHandle> $$(String selector)
public boolean isIntersectingViewport()
public void click()
throws InterruptedException,
ExecutionException
public void click(boolean isBlock)
throws InterruptedException,
ExecutionException
isBlock - 是否阻塞InterruptedException - 打断异常ExecutionException - 异常public void click(ClickOptions options, boolean isBlock) throws InterruptedException, ExecutionException
public void focus()
public void hover()
throws ExecutionException,
InterruptedException
public void tap(boolean isBlock)
isBlock - 是否是阻塞的,阻塞的话会在当前线程内完成public void tap()
public void type(String text) throws InterruptedException
public void type(String text, int delay) throws InterruptedException
public void press(String key) throws InterruptedException
public void press(String key, int delay, String text) throws InterruptedException
public Clip boundingBox()
public RemoteObject getRemoteObject()
getRemoteObject 在类中 JSHandleCopyright © 2020. All rights reserved.