public class EmulationManager extends Object implements ClientProvider
| 构造器和说明 |
|---|
EmulationManager(CDPSession client) |
| 限定符和类型 | 方法和说明 |
|---|---|
List<CDPSession> |
clients() |
void |
emulateCPUThrottling(double factor) |
void |
emulateIdleState(IdleOverridesState.Overrides overrides) |
void |
emulateMediaFeatures(List<MediaFeature> features) |
void |
emulateMediaType(MediaType type) |
void |
emulateTimezone(String timezoneId) |
boolean |
emulateViewport(Viewport viewport) |
void |
emulateVisionDeficiency(VisionDeficiency type) |
boolean |
javascriptEnabled() |
void |
registerSpeculativeSession(CdpCDPSession _client) |
void |
registerState(EmulatedState<?> state) |
void |
resetDefaultBackgroundColor()
Resets default white background
|
void |
setGeolocation(GeolocationOptions options) |
void |
setJavaScriptEnabled(boolean enabled) |
void |
setTransparentBackgroundColor()
Hides default white background
|
void |
updateClient(CDPSession client) |
public EmulationManager(CDPSession client)
public void updateClient(CDPSession client)
public void registerState(EmulatedState<?> state)
registerState 在接口中 ClientProviderpublic List<CDPSession> clients()
clients 在接口中 ClientProviderpublic void registerSpeculativeSession(CdpCDPSession _client)
public boolean javascriptEnabled()
public boolean emulateViewport(Viewport viewport)
public void emulateIdleState(IdleOverridesState.Overrides overrides)
public void emulateTimezone(String timezoneId)
public void emulateVisionDeficiency(VisionDeficiency type)
public void emulateCPUThrottling(double factor)
public void emulateMediaFeatures(List<MediaFeature> features)
public void emulateMediaType(MediaType type)
public void setGeolocation(GeolocationOptions options)
public void resetDefaultBackgroundColor()
public void setTransparentBackgroundColor()
public void setJavaScriptEnabled(boolean enabled)
Copyright © 2020–2025. All rights reserved.