sentence1
stringlengths
52
3.87M
sentence2
stringlengths
1
47.2k
label
stringclasses
1 value
def DOMDebugger_setXHRBreakpoint(self, url): """ Function path: DOMDebugger.setXHRBreakpoint Domain: DOMDebugger Method name: setXHRBreakpoint Parameters: Required arguments: 'url' (type: string) -> Resource URL substring. All XHRs having this substring in the URL will get stopped upon. No r...
Function path: DOMDebugger.setXHRBreakpoint Domain: DOMDebugger Method name: setXHRBreakpoint Parameters: Required arguments: 'url' (type: string) -> Resource URL substring. All XHRs having this substring in the URL will get stopped upon. No return value. Description: Sets breakpoint on XM...
entailment
def DOMDebugger_removeXHRBreakpoint(self, url): """ Function path: DOMDebugger.removeXHRBreakpoint Domain: DOMDebugger Method name: removeXHRBreakpoint Parameters: Required arguments: 'url' (type: string) -> Resource URL substring. No return value. Description: Removes breakpoint from ...
Function path: DOMDebugger.removeXHRBreakpoint Domain: DOMDebugger Method name: removeXHRBreakpoint Parameters: Required arguments: 'url' (type: string) -> Resource URL substring. No return value. Description: Removes breakpoint from XMLHttpRequest.
entailment
def Target_setDiscoverTargets(self, discover): """ Function path: Target.setDiscoverTargets Domain: Target Method name: setDiscoverTargets Parameters: Required arguments: 'discover' (type: boolean) -> Whether to discover available targets. No return value. Description: Controls whether...
Function path: Target.setDiscoverTargets Domain: Target Method name: setDiscoverTargets Parameters: Required arguments: 'discover' (type: boolean) -> Whether to discover available targets. No return value. Description: Controls whether to discover available targets and notify via <code>tar...
entailment
def Target_setAutoAttach(self, autoAttach, waitForDebuggerOnStart): """ Function path: Target.setAutoAttach Domain: Target Method name: setAutoAttach Parameters: Required arguments: 'autoAttach' (type: boolean) -> Whether to auto-attach to related targets. 'waitForDebuggerOnStart' (type: b...
Function path: Target.setAutoAttach Domain: Target Method name: setAutoAttach Parameters: Required arguments: 'autoAttach' (type: boolean) -> Whether to auto-attach to related targets. 'waitForDebuggerOnStart' (type: boolean) -> Whether to pause new targets when attaching to them. Use <code>Ru...
entailment
def Target_setAttachToFrames(self, value): """ Function path: Target.setAttachToFrames Domain: Target Method name: setAttachToFrames Parameters: Required arguments: 'value' (type: boolean) -> Whether to attach to frames. No return value. """ assert isinstance(value, (bool,) ), "...
Function path: Target.setAttachToFrames Domain: Target Method name: setAttachToFrames Parameters: Required arguments: 'value' (type: boolean) -> Whether to attach to frames. No return value.
entailment
def Target_setRemoteLocations(self, locations): """ Function path: Target.setRemoteLocations Domain: Target Method name: setRemoteLocations Parameters: Required arguments: 'locations' (type: array) -> List of remote locations. No return value. Description: Enables target discovery for ...
Function path: Target.setRemoteLocations Domain: Target Method name: setRemoteLocations Parameters: Required arguments: 'locations' (type: array) -> List of remote locations. No return value. Description: Enables target discovery for the specified locations, when <code>setDiscoverTargets</...
entailment
def Target_sendMessageToTarget(self, message, **kwargs): """ Function path: Target.sendMessageToTarget Domain: Target Method name: sendMessageToTarget Parameters: Required arguments: 'message' (type: string) -> No description Optional arguments: 'sessionId' (type: SessionID) -> Identif...
Function path: Target.sendMessageToTarget Domain: Target Method name: sendMessageToTarget Parameters: Required arguments: 'message' (type: string) -> No description Optional arguments: 'sessionId' (type: SessionID) -> Identifier of the session. 'targetId' (type: TargetID) -> Deprecate...
entailment
def ServiceWorker_unregister(self, scopeURL): """ Function path: ServiceWorker.unregister Domain: ServiceWorker Method name: unregister Parameters: Required arguments: 'scopeURL' (type: string) -> No description No return value. """ assert isinstance(scopeURL, (str,) ), "Argumen...
Function path: ServiceWorker.unregister Domain: ServiceWorker Method name: unregister Parameters: Required arguments: 'scopeURL' (type: string) -> No description No return value.
entailment
def ServiceWorker_updateRegistration(self, scopeURL): """ Function path: ServiceWorker.updateRegistration Domain: ServiceWorker Method name: updateRegistration Parameters: Required arguments: 'scopeURL' (type: string) -> No description No return value. """ assert isinstance(scopeURL, ...
Function path: ServiceWorker.updateRegistration Domain: ServiceWorker Method name: updateRegistration Parameters: Required arguments: 'scopeURL' (type: string) -> No description No return value.
entailment
def ServiceWorker_startWorker(self, scopeURL): """ Function path: ServiceWorker.startWorker Domain: ServiceWorker Method name: startWorker Parameters: Required arguments: 'scopeURL' (type: string) -> No description No return value. """ assert isinstance(scopeURL, (str,) ), "Argu...
Function path: ServiceWorker.startWorker Domain: ServiceWorker Method name: startWorker Parameters: Required arguments: 'scopeURL' (type: string) -> No description No return value.
entailment
def ServiceWorker_skipWaiting(self, scopeURL): """ Function path: ServiceWorker.skipWaiting Domain: ServiceWorker Method name: skipWaiting Parameters: Required arguments: 'scopeURL' (type: string) -> No description No return value. """ assert isinstance(scopeURL, (str,) ), "Argu...
Function path: ServiceWorker.skipWaiting Domain: ServiceWorker Method name: skipWaiting Parameters: Required arguments: 'scopeURL' (type: string) -> No description No return value.
entailment
def ServiceWorker_stopWorker(self, versionId): """ Function path: ServiceWorker.stopWorker Domain: ServiceWorker Method name: stopWorker Parameters: Required arguments: 'versionId' (type: string) -> No description No return value. """ assert isinstance(versionId, (str,) ), "Argu...
Function path: ServiceWorker.stopWorker Domain: ServiceWorker Method name: stopWorker Parameters: Required arguments: 'versionId' (type: string) -> No description No return value.
entailment
def ServiceWorker_inspectWorker(self, versionId): """ Function path: ServiceWorker.inspectWorker Domain: ServiceWorker Method name: inspectWorker Parameters: Required arguments: 'versionId' (type: string) -> No description No return value. """ assert isinstance(versionId, (str,) ...
Function path: ServiceWorker.inspectWorker Domain: ServiceWorker Method name: inspectWorker Parameters: Required arguments: 'versionId' (type: string) -> No description No return value.
entailment
def ServiceWorker_setForceUpdateOnPageLoad(self, forceUpdateOnPageLoad): """ Function path: ServiceWorker.setForceUpdateOnPageLoad Domain: ServiceWorker Method name: setForceUpdateOnPageLoad Parameters: Required arguments: 'forceUpdateOnPageLoad' (type: boolean) -> No description No return v...
Function path: ServiceWorker.setForceUpdateOnPageLoad Domain: ServiceWorker Method name: setForceUpdateOnPageLoad Parameters: Required arguments: 'forceUpdateOnPageLoad' (type: boolean) -> No description No return value.
entailment
def ServiceWorker_deliverPushMessage(self, origin, registrationId, data): """ Function path: ServiceWorker.deliverPushMessage Domain: ServiceWorker Method name: deliverPushMessage Parameters: Required arguments: 'origin' (type: string) -> No description 'registrationId' (type: string) -> N...
Function path: ServiceWorker.deliverPushMessage Domain: ServiceWorker Method name: deliverPushMessage Parameters: Required arguments: 'origin' (type: string) -> No description 'registrationId' (type: string) -> No description 'data' (type: string) -> No description No return value.
entailment
def ServiceWorker_dispatchSyncEvent(self, origin, registrationId, tag, lastChance): """ Function path: ServiceWorker.dispatchSyncEvent Domain: ServiceWorker Method name: dispatchSyncEvent Parameters: Required arguments: 'origin' (type: string) -> No description 'registrationId' (type:...
Function path: ServiceWorker.dispatchSyncEvent Domain: ServiceWorker Method name: dispatchSyncEvent Parameters: Required arguments: 'origin' (type: string) -> No description 'registrationId' (type: string) -> No description 'tag' (type: string) -> No description 'lastChance' (type: b...
entailment
def Input_setIgnoreInputEvents(self, ignore): """ Function path: Input.setIgnoreInputEvents Domain: Input Method name: setIgnoreInputEvents Parameters: Required arguments: 'ignore' (type: boolean) -> Ignores input events processing when set to true. No return value. Description: Ignore...
Function path: Input.setIgnoreInputEvents Domain: Input Method name: setIgnoreInputEvents Parameters: Required arguments: 'ignore' (type: boolean) -> Ignores input events processing when set to true. No return value. Description: Ignores input events (useful while auditing page).
entailment
def Input_dispatchMouseEvent(self, type, x, y, **kwargs): """ Function path: Input.dispatchMouseEvent Domain: Input Method name: dispatchMouseEvent Parameters: Required arguments: 'type' (type: string) -> Type of the mouse event. 'x' (type: number) -> X coordinate of the event relative to ...
Function path: Input.dispatchMouseEvent Domain: Input Method name: dispatchMouseEvent Parameters: Required arguments: 'type' (type: string) -> Type of the mouse event. 'x' (type: number) -> X coordinate of the event relative to the main frame's viewport in CSS pixels. 'y' (type: number) -...
entailment
def Input_dispatchTouchEvent(self, type, touchPoints, **kwargs): """ Function path: Input.dispatchTouchEvent Domain: Input Method name: dispatchTouchEvent WARNING: This function is marked 'Experimental'! Parameters: Required arguments: 'type' (type: string) -> Type of the touch event. Tou...
Function path: Input.dispatchTouchEvent Domain: Input Method name: dispatchTouchEvent WARNING: This function is marked 'Experimental'! Parameters: Required arguments: 'type' (type: string) -> Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while TouchStart...
entailment
def Input_synthesizePinchGesture(self, x, y, scaleFactor, **kwargs): """ Function path: Input.synthesizePinchGesture Domain: Input Method name: synthesizePinchGesture WARNING: This function is marked 'Experimental'! Parameters: Required arguments: 'x' (type: number) -> X coordinate of the...
Function path: Input.synthesizePinchGesture Domain: Input Method name: synthesizePinchGesture WARNING: This function is marked 'Experimental'! Parameters: Required arguments: 'x' (type: number) -> X coordinate of the start of the gesture in CSS pixels. 'y' (type: number) -> Y coordinate ...
entailment
def LayerTree_loadSnapshot(self, tiles): """ Function path: LayerTree.loadSnapshot Domain: LayerTree Method name: loadSnapshot Parameters: Required arguments: 'tiles' (type: array) -> An array of tiles composing the snapshot. Returns: 'snapshotId' (type: SnapshotId) -> The id of the snap...
Function path: LayerTree.loadSnapshot Domain: LayerTree Method name: loadSnapshot Parameters: Required arguments: 'tiles' (type: array) -> An array of tiles composing the snapshot. Returns: 'snapshotId' (type: SnapshotId) -> The id of the snapshot. Description: Returns the snapshot ide...
entailment
def Tracing_recordClockSyncMarker(self, syncId): """ Function path: Tracing.recordClockSyncMarker Domain: Tracing Method name: recordClockSyncMarker Parameters: Required arguments: 'syncId' (type: string) -> The ID of this clock sync marker No return value. Description: Record a clock ...
Function path: Tracing.recordClockSyncMarker Domain: Tracing Method name: recordClockSyncMarker Parameters: Required arguments: 'syncId' (type: string) -> The ID of this clock sync marker No return value. Description: Record a clock sync marker in the trace.
entailment
def Animation_setPlaybackRate(self, playbackRate): """ Function path: Animation.setPlaybackRate Domain: Animation Method name: setPlaybackRate Parameters: Required arguments: 'playbackRate' (type: number) -> Playback rate for animations on page No return value. Description: Sets the pl...
Function path: Animation.setPlaybackRate Domain: Animation Method name: setPlaybackRate Parameters: Required arguments: 'playbackRate' (type: number) -> Playback rate for animations on page No return value. Description: Sets the playback rate of the document timeline.
entailment
def Animation_getCurrentTime(self, id): """ Function path: Animation.getCurrentTime Domain: Animation Method name: getCurrentTime Parameters: Required arguments: 'id' (type: string) -> Id of animation. Returns: 'currentTime' (type: number) -> Current time of the page. Description: ...
Function path: Animation.getCurrentTime Domain: Animation Method name: getCurrentTime Parameters: Required arguments: 'id' (type: string) -> Id of animation. Returns: 'currentTime' (type: number) -> Current time of the page. Description: Returns the current time of the an animation.
entailment
def Animation_setPaused(self, animations, paused): """ Function path: Animation.setPaused Domain: Animation Method name: setPaused Parameters: Required arguments: 'animations' (type: array) -> Animations to set the pause state of. 'paused' (type: boolean) -> Paused state to set to. No r...
Function path: Animation.setPaused Domain: Animation Method name: setPaused Parameters: Required arguments: 'animations' (type: array) -> Animations to set the pause state of. 'paused' (type: boolean) -> Paused state to set to. No return value. Description: Sets the paused state of a ...
entailment
def Animation_setTiming(self, animationId, duration, delay): """ Function path: Animation.setTiming Domain: Animation Method name: setTiming Parameters: Required arguments: 'animationId' (type: string) -> Animation id. 'duration' (type: number) -> Duration of the animation. 'delay' (t...
Function path: Animation.setTiming Domain: Animation Method name: setTiming Parameters: Required arguments: 'animationId' (type: string) -> Animation id. 'duration' (type: number) -> Duration of the animation. 'delay' (type: number) -> Delay of the animation. No return value. Des...
entailment
def Animation_seekAnimations(self, animations, currentTime): """ Function path: Animation.seekAnimations Domain: Animation Method name: seekAnimations Parameters: Required arguments: 'animations' (type: array) -> List of animation ids to seek. 'currentTime' (type: number) -> Set the curren...
Function path: Animation.seekAnimations Domain: Animation Method name: seekAnimations Parameters: Required arguments: 'animations' (type: array) -> List of animation ids to seek. 'currentTime' (type: number) -> Set the current time of each animation. No return value. Description: Seek...
entailment
def Animation_releaseAnimations(self, animations): """ Function path: Animation.releaseAnimations Domain: Animation Method name: releaseAnimations Parameters: Required arguments: 'animations' (type: array) -> List of animation ids to seek. No return value. Description: Releases a set o...
Function path: Animation.releaseAnimations Domain: Animation Method name: releaseAnimations Parameters: Required arguments: 'animations' (type: array) -> List of animation ids to seek. No return value. Description: Releases a set of animations to no longer be manipulated.
entailment
def Animation_resolveAnimation(self, animationId): """ Function path: Animation.resolveAnimation Domain: Animation Method name: resolveAnimation Parameters: Required arguments: 'animationId' (type: string) -> Animation id. Returns: 'remoteObject' (type: Runtime.RemoteObject) -> Correspon...
Function path: Animation.resolveAnimation Domain: Animation Method name: resolveAnimation Parameters: Required arguments: 'animationId' (type: string) -> Animation id. Returns: 'remoteObject' (type: Runtime.RemoteObject) -> Corresponding remote object. Description: Gets the remote obje...
entailment
def Storage_clearDataForOrigin(self, origin, storageTypes): """ Function path: Storage.clearDataForOrigin Domain: Storage Method name: clearDataForOrigin Parameters: Required arguments: 'origin' (type: string) -> Security origin. 'storageTypes' (type: string) -> Comma separated origin name...
Function path: Storage.clearDataForOrigin Domain: Storage Method name: clearDataForOrigin Parameters: Required arguments: 'origin' (type: string) -> Security origin. 'storageTypes' (type: string) -> Comma separated origin names. No return value. Description: Clears storage for origin.
entailment
def Storage_getUsageAndQuota(self, origin): """ Function path: Storage.getUsageAndQuota Domain: Storage Method name: getUsageAndQuota Parameters: Required arguments: 'origin' (type: string) -> Security origin. Returns: 'usage' (type: number) -> Storage usage (bytes). 'quota' (type: n...
Function path: Storage.getUsageAndQuota Domain: Storage Method name: getUsageAndQuota Parameters: Required arguments: 'origin' (type: string) -> Security origin. Returns: 'usage' (type: number) -> Storage usage (bytes). 'quota' (type: number) -> Storage quota (bytes). 'usageBreakdown...
entailment
def Storage_trackCacheStorageForOrigin(self, origin): """ Function path: Storage.trackCacheStorageForOrigin Domain: Storage Method name: trackCacheStorageForOrigin Parameters: Required arguments: 'origin' (type: string) -> Security origin. No return value. Description: Registers origin...
Function path: Storage.trackCacheStorageForOrigin Domain: Storage Method name: trackCacheStorageForOrigin Parameters: Required arguments: 'origin' (type: string) -> Security origin. No return value. Description: Registers origin to be notified when an update occurs to its cache storage lis...
entailment
def Storage_untrackCacheStorageForOrigin(self, origin): """ Function path: Storage.untrackCacheStorageForOrigin Domain: Storage Method name: untrackCacheStorageForOrigin Parameters: Required arguments: 'origin' (type: string) -> Security origin. No return value. Description: Unregister...
Function path: Storage.untrackCacheStorageForOrigin Domain: Storage Method name: untrackCacheStorageForOrigin Parameters: Required arguments: 'origin' (type: string) -> Security origin. No return value. Description: Unregisters origin from receiving notifications for cache storage.
entailment
def Log_startViolationsReport(self, config): """ Function path: Log.startViolationsReport Domain: Log Method name: startViolationsReport Parameters: Required arguments: 'config' (type: array) -> Configuration for violations. No return value. Description: start violation reporting. ""...
Function path: Log.startViolationsReport Domain: Log Method name: startViolationsReport Parameters: Required arguments: 'config' (type: array) -> Configuration for violations. No return value. Description: start violation reporting.
entailment
def Tethering_bind(self, port): """ Function path: Tethering.bind Domain: Tethering Method name: bind Parameters: Required arguments: 'port' (type: integer) -> Port number to bind. No return value. Description: Request browser port binding. """ assert isinstance(port, (int,) ...
Function path: Tethering.bind Domain: Tethering Method name: bind Parameters: Required arguments: 'port' (type: integer) -> Port number to bind. No return value. Description: Request browser port binding.
entailment
def Tethering_unbind(self, port): """ Function path: Tethering.unbind Domain: Tethering Method name: unbind Parameters: Required arguments: 'port' (type: integer) -> Port number to unbind. No return value. Description: Request browser port unbinding. """ assert isinstance(port, (in...
Function path: Tethering.unbind Domain: Tethering Method name: unbind Parameters: Required arguments: 'port' (type: integer) -> Port number to unbind. No return value. Description: Request browser port unbinding.
entailment
def Browser_setWindowBounds(self, windowId, bounds): """ Function path: Browser.setWindowBounds Domain: Browser Method name: setWindowBounds Parameters: Required arguments: 'windowId' (type: WindowID) -> Browser window id. 'bounds' (type: Bounds) -> New window bounds. The 'minimized', 'max...
Function path: Browser.setWindowBounds Domain: Browser Method name: setWindowBounds Parameters: Required arguments: 'windowId' (type: WindowID) -> Browser window id. 'bounds' (type: Bounds) -> New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left...
entailment
def Runtime_evaluate(self, expression, **kwargs): """ Function path: Runtime.evaluate Domain: Runtime Method name: evaluate Parameters: Required arguments: 'expression' (type: string) -> Expression to evaluate. Optional arguments: 'objectGroup' (type: string) -> Symbolic group name tha...
Function path: Runtime.evaluate Domain: Runtime Method name: evaluate Parameters: Required arguments: 'expression' (type: string) -> Expression to evaluate. Optional arguments: 'objectGroup' (type: string) -> Symbolic group name that can be used to release multiple objects. 'includeCo...
entailment
def Runtime_callFunctionOn(self, functionDeclaration, **kwargs): """ Function path: Runtime.callFunctionOn Domain: Runtime Method name: callFunctionOn Parameters: Required arguments: 'functionDeclaration' (type: string) -> Declaration of the function to call. Optional arguments: 'objec...
Function path: Runtime.callFunctionOn Domain: Runtime Method name: callFunctionOn Parameters: Required arguments: 'functionDeclaration' (type: string) -> Declaration of the function to call. Optional arguments: 'objectId' (type: RemoteObjectId) -> Identifier of the object to call function ...
entailment
def Runtime_releaseObjectGroup(self, objectGroup): """ Function path: Runtime.releaseObjectGroup Domain: Runtime Method name: releaseObjectGroup Parameters: Required arguments: 'objectGroup' (type: string) -> Symbolic object group name. No return value. Description: Releases all remote...
Function path: Runtime.releaseObjectGroup Domain: Runtime Method name: releaseObjectGroup Parameters: Required arguments: 'objectGroup' (type: string) -> Symbolic object group name. No return value. Description: Releases all remote objects that belong to a given group.
entailment
def Runtime_setCustomObjectFormatterEnabled(self, enabled): """ Function path: Runtime.setCustomObjectFormatterEnabled Domain: Runtime Method name: setCustomObjectFormatterEnabled WARNING: This function is marked 'Experimental'! Parameters: Required arguments: 'enabled' (type: boolean) ->...
Function path: Runtime.setCustomObjectFormatterEnabled Domain: Runtime Method name: setCustomObjectFormatterEnabled WARNING: This function is marked 'Experimental'! Parameters: Required arguments: 'enabled' (type: boolean) -> No description No return value.
entailment
def Runtime_compileScript(self, expression, sourceURL, persistScript, **kwargs ): """ Function path: Runtime.compileScript Domain: Runtime Method name: compileScript Parameters: Required arguments: 'expression' (type: string) -> Expression to compile. 'sourceURL' (type: string) -> Sou...
Function path: Runtime.compileScript Domain: Runtime Method name: compileScript Parameters: Required arguments: 'expression' (type: string) -> Expression to compile. 'sourceURL' (type: string) -> Source url to be set for the script. 'persistScript' (type: boolean) -> Specifies whether the...
entailment
def Runtime_runScript(self, scriptId, **kwargs): """ Function path: Runtime.runScript Domain: Runtime Method name: runScript Parameters: Required arguments: 'scriptId' (type: ScriptId) -> Id of the script to run. Optional arguments: 'executionContextId' (type: ExecutionContextId) -> Sp...
Function path: Runtime.runScript Domain: Runtime Method name: runScript Parameters: Required arguments: 'scriptId' (type: ScriptId) -> Id of the script to run. Optional arguments: 'executionContextId' (type: ExecutionContextId) -> Specifies in which execution context to perform script run....
entailment
def Debugger_setBreakpointsActive(self, active): """ Function path: Debugger.setBreakpointsActive Domain: Debugger Method name: setBreakpointsActive Parameters: Required arguments: 'active' (type: boolean) -> New value for breakpoints active state. No return value. Description: Activat...
Function path: Debugger.setBreakpointsActive Domain: Debugger Method name: setBreakpointsActive Parameters: Required arguments: 'active' (type: boolean) -> New value for breakpoints active state. No return value. Description: Activates / deactivates all breakpoints on the page.
entailment
def Debugger_setSkipAllPauses(self, skip): """ Function path: Debugger.setSkipAllPauses Domain: Debugger Method name: setSkipAllPauses Parameters: Required arguments: 'skip' (type: boolean) -> New value for skip pauses state. No return value. Description: Makes page not interrupt on an...
Function path: Debugger.setSkipAllPauses Domain: Debugger Method name: setSkipAllPauses Parameters: Required arguments: 'skip' (type: boolean) -> New value for skip pauses state. No return value. Description: Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc)...
entailment
def Debugger_setScriptSource(self, scriptId, scriptSource, **kwargs): """ Function path: Debugger.setScriptSource Domain: Debugger Method name: setScriptSource Parameters: Required arguments: 'scriptId' (type: Runtime.ScriptId) -> Id of the script to edit. 'scriptSource' (type: string) -> ...
Function path: Debugger.setScriptSource Domain: Debugger Method name: setScriptSource Parameters: Required arguments: 'scriptId' (type: Runtime.ScriptId) -> Id of the script to edit. 'scriptSource' (type: string) -> New content of the script. Optional arguments: 'dryRun' (type: boolea...
entailment
def Debugger_setPauseOnExceptions(self, state): """ Function path: Debugger.setPauseOnExceptions Domain: Debugger Method name: setPauseOnExceptions Parameters: Required arguments: 'state' (type: string) -> Pause on exceptions mode. No return value. Description: Defines pause on excepti...
Function path: Debugger.setPauseOnExceptions Domain: Debugger Method name: setPauseOnExceptions Parameters: Required arguments: 'state' (type: string) -> Pause on exceptions mode. No return value. Description: Defines pause on exceptions state. Can be set to stop on all exceptions, uncaugh...
entailment
def Debugger_setVariableValue(self, scopeNumber, variableName, newValue, callFrameId): """ Function path: Debugger.setVariableValue Domain: Debugger Method name: setVariableValue Parameters: Required arguments: 'scopeNumber' (type: integer) -> 0-based number of scope as was listed in scope...
Function path: Debugger.setVariableValue Domain: Debugger Method name: setVariableValue Parameters: Required arguments: 'scopeNumber' (type: integer) -> 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulat...
entailment
def Debugger_setAsyncCallStackDepth(self, maxDepth): """ Function path: Debugger.setAsyncCallStackDepth Domain: Debugger Method name: setAsyncCallStackDepth Parameters: Required arguments: 'maxDepth' (type: integer) -> Maximum depth of async call stacks. Setting to <code>0</code> will effective...
Function path: Debugger.setAsyncCallStackDepth Domain: Debugger Method name: setAsyncCallStackDepth Parameters: Required arguments: 'maxDepth' (type: integer) -> Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default). No retu...
entailment
def Debugger_setBlackboxPatterns(self, patterns): """ Function path: Debugger.setBlackboxPatterns Domain: Debugger Method name: setBlackboxPatterns WARNING: This function is marked 'Experimental'! Parameters: Required arguments: 'patterns' (type: array) -> Array of regexps that will be us...
Function path: Debugger.setBlackboxPatterns Domain: Debugger Method name: setBlackboxPatterns WARNING: This function is marked 'Experimental'! Parameters: Required arguments: 'patterns' (type: array) -> Array of regexps that will be used to check script url for blackbox state. No return va...
entailment
def Debugger_setBlackboxedRanges(self, scriptId, positions): """ Function path: Debugger.setBlackboxedRanges Domain: Debugger Method name: setBlackboxedRanges WARNING: This function is marked 'Experimental'! Parameters: Required arguments: 'scriptId' (type: Runtime.ScriptId) -> Id of the ...
Function path: Debugger.setBlackboxedRanges Domain: Debugger Method name: setBlackboxedRanges WARNING: This function is marked 'Experimental'! Parameters: Required arguments: 'scriptId' (type: Runtime.ScriptId) -> Id of the script. 'positions' (type: array) -> No description No return...
entailment
def Profiler_setSamplingInterval(self, interval): """ Function path: Profiler.setSamplingInterval Domain: Profiler Method name: setSamplingInterval Parameters: Required arguments: 'interval' (type: integer) -> New sampling interval in microseconds. No return value. Description: Changes...
Function path: Profiler.setSamplingInterval Domain: Profiler Method name: setSamplingInterval Parameters: Required arguments: 'interval' (type: integer) -> New sampling interval in microseconds. No return value. Description: Changes CPU profiler sampling interval. Must be called before CPU...
entailment
def update_headers(self, header_args): ''' Given a set of headers, update both the user-agent and additional headers for the remote browser. header_args must be a dict. Keys are the names of the corresponding HTTP header. return value is a 2-tuple of the results of the user-agent update, as well as the ...
Given a set of headers, update both the user-agent and additional headers for the remote browser. header_args must be a dict. Keys are the names of the corresponding HTTP header. return value is a 2-tuple of the results of the user-agent update, as well as the extra headers update. If no 'User-Agent' key ...
entailment
def get_cookies(self): ''' Retreive the cookies from the remote browser. Return value is a list of http.cookiejar.Cookie() instances. These can be directly used with the various http.cookiejar.XXXCookieJar cookie management classes. ''' ret = self.Network_getAllCookies() assert 'result' in ret, "No re...
Retreive the cookies from the remote browser. Return value is a list of http.cookiejar.Cookie() instances. These can be directly used with the various http.cookiejar.XXXCookieJar cookie management classes.
entailment
def set_cookie(self, cookie): ''' Add a cookie to the remote chromium instance. Passed value `cookie` must be an instance of `http.cookiejar.Cookie()`. ''' # Function path: Network.setCookie # Domain: Network # Method name: setCookie # WARNING: This function is marked 'Experimental'! # Parameters: ...
Add a cookie to the remote chromium instance. Passed value `cookie` must be an instance of `http.cookiejar.Cookie()`.
entailment
def get_current_url(self): ''' Probe the remote session for the current window URL. This is primarily used to do things like unwrap redirects, or circumvent outbound url wrappers. ''' res = self.Page_getNavigationHistory() assert 'result' in res assert 'currentIndex' in res['result'] assert 'entries...
Probe the remote session for the current window URL. This is primarily used to do things like unwrap redirects, or circumvent outbound url wrappers.
entailment
def get_page_url_title(self): ''' Get the title and current url from the remote session. Return is a 2-tuple: (page_title, page_url). ''' cr_tab_id = self.transport._get_cr_tab_meta_for_key(self.tab_id)['id'] targets = self.Target_getTargets() assert 'result' in targets assert 'targetInfos' in targe...
Get the title and current url from the remote session. Return is a 2-tuple: (page_title, page_url).
entailment
def execute_javascript(self, *args, **kwargs): ''' Execute a javascript string in the context of the browser tab. ''' ret = self.__exec_js(*args, **kwargs) return ret
Execute a javascript string in the context of the browser tab.
entailment
def find_element(self, search): ''' DOM_performSearch(self, query, includeUserAgentShadowDOM) Python Function: DOM_performSearch Domain: DOM Method name: performSearch WARNING: This function is marked 'Experimental'! Parameters: 'query' (type: string) -...
DOM_performSearch(self, query, includeUserAgentShadowDOM) Python Function: DOM_performSearch Domain: DOM Method name: performSearch WARNING: This function is marked 'Experimental'! Parameters: 'query' (type: string) -> Plain text or query selector or XPath s...
entailment
def get_unpacked_response_body(self, requestId, mimetype="application/unknown"): ''' Return a unpacked, decoded resposne body from Network_getResponseBody() ''' content = self.Network_getResponseBody(requestId) assert 'result' in content result = content['result'] assert 'base64Encoded' in result asse...
Return a unpacked, decoded resposne body from Network_getResponseBody()
entailment
def handle_page_location_changed(self, timeout=None): ''' If the chrome tab has internally redirected (generally because jerberscript), this will walk the page navigation responses and attempt to fetch the response body for the tab's latest location. ''' # In general, this is often called after other mecha...
If the chrome tab has internally redirected (generally because jerberscript), this will walk the page navigation responses and attempt to fetch the response body for the tab's latest location.
entailment
def blocking_navigate_and_get_source(self, url, timeout=DEFAULT_TIMEOUT_SECS): ''' Do a blocking navigate to url `url`, and then extract the response body and return that. This effectively returns the *unrendered* page content that's sent over the wire. As such, if the page does any modification of the conta...
Do a blocking navigate to url `url`, and then extract the response body and return that. This effectively returns the *unrendered* page content that's sent over the wire. As such, if the page does any modification of the contained markup during rendering (via javascript), this function will not reflect the cha...
entailment
def get_rendered_page_source(self, dom_idle_requirement_secs=3, max_wait_timeout=30): ''' Get the HTML markup for the current page. This is done by looking up the root DOM node, and then requesting the outer HTML for that node ID. This calls return will reflect any modifications made by javascript to the ...
Get the HTML markup for the current page. This is done by looking up the root DOM node, and then requesting the outer HTML for that node ID. This calls return will reflect any modifications made by javascript to the page. For unmodified content, use `blocking_navigate_and_get_source()` dom_idle_requirement...
entailment
def take_screeshot(self): ''' Take a screenshot of the virtual viewport content. Return value is a png image as a bytestring. ''' resp = self.Page_captureScreenshot() assert 'result' in resp assert 'data' in resp['result'] imgdat = base64.b64decode(resp['result']['data']) return imgdat
Take a screenshot of the virtual viewport content. Return value is a png image as a bytestring.
entailment
def blocking_navigate(self, url, timeout=DEFAULT_TIMEOUT_SECS): ''' Do a blocking navigate to url `url`. This function triggers a navigation, and then waits for the browser to claim the page has finished loading. Roughly, this corresponds to the javascript `DOMContentLoaded` event, meaning the dom for the...
Do a blocking navigate to url `url`. This function triggers a navigation, and then waits for the browser to claim the page has finished loading. Roughly, this corresponds to the javascript `DOMContentLoaded` event, meaning the dom for the page is ready. Internals: A navigation command results in a sequ...
entailment
def tab(self, netloc=None, url=None, extra_id=None, use_tid=False): ''' Get a chromium tab from the pool, optionally one that has an association with a specific netloc/URL. If no url or netloc is specified, the per-thread identifier will be used. If `extra_id` is specified, it's stringified value will be mixed...
Get a chromium tab from the pool, optionally one that has an association with a specific netloc/URL. If no url or netloc is specified, the per-thread identifier will be used. If `extra_id` is specified, it's stringified value will be mixed into the pool key If `use_tid` is true, the per-thread identifier will be...
entailment
def on_parent_exit(signame): """ Return a function to be run in a child process which will trigger SIGNAME to be sent when the parent process dies """ signum = getattr(signal, signame) def set_parent_exit_signal(): # http://linux.die.net/man/2/prctl result = cdll['libc.so.6'].prc...
Return a function to be run in a child process which will trigger SIGNAME to be sent when the parent process dies
entailment
def ChromeContext(*args, **kwargs): ''' Context manager for conveniently handling the lifetime of the underlying chromium instance. In general, this should be the preferred way to use an instance of `ChromeRemoteDebugInterface`. All parameters are forwarded through to the underlying ChromeRemoteDebugInterface() c...
Context manager for conveniently handling the lifetime of the underlying chromium instance. In general, this should be the preferred way to use an instance of `ChromeRemoteDebugInterface`. All parameters are forwarded through to the underlying ChromeRemoteDebugInterface() constructor.
entailment
def synchronous_command(self, *args, **kwargs): ''' Forward a command to the remote chrome instance via the transport connection, and check the return for an error. If the command resulted in an error, a `ChromeController.ChromeError` is raised, with the error string containing the response from the remote ...
Forward a command to the remote chrome instance via the transport connection, and check the return for an error. If the command resulted in an error, a `ChromeController.ChromeError` is raised, with the error string containing the response from the remote chrome instance describing the problem and it's cause. ...
entailment
def drain_transport(self): ''' "Drain" the transport connection. This command simply returns all waiting messages sent from the remote chrome instance. This can be useful when waiting for a specific asynchronous message from chrome, but higher level calls are better suited for managing wait-for-message typ...
"Drain" the transport connection. This command simply returns all waiting messages sent from the remote chrome instance. This can be useful when waiting for a specific asynchronous message from chrome, but higher level calls are better suited for managing wait-for-message type needs.
entailment
def resetLoggingLocks(): ''' This function is a HACK! Basically, if we fork() while a logging lock is held, the lock is /copied/ while in the acquired state. However, since we've forked, the thread that acquired the lock no longer exists, so it can never unlock the lock, and we end up blocking forever. Theref...
This function is a HACK! Basically, if we fork() while a logging lock is held, the lock is /copied/ while in the acquired state. However, since we've forked, the thread that acquired the lock no longer exists, so it can never unlock the lock, and we end up blocking forever. Therefore, we manually enter the logg...
entailment
def stream_emit(self, record, source_name): """ Emit a record. If a formatter is specified, it is used to format the record. The record is then written to the stream with a trailing newline. If exception information is present, it is formatted using traceback.print_exception and appended to the stream. I...
Emit a record. If a formatter is specified, it is used to format the record. The record is then written to the stream with a trailing newline. If exception information is present, it is formatted using traceback.print_exception and appended to the stream. If the stream has an 'encoding' attribute, it is us...
entailment
def emit(self, record): """ Emit a record. If the stream was not opened because 'delay' was specified in the constructor, open it before calling the superclass's emit. """ failures = 0 while failures < 3: try: self.stream_emit(record, record.name) break except: failures += 1 else: ...
Emit a record. If the stream was not opened because 'delay' was specified in the constructor, open it before calling the superclass's emit.
entailment
def run_suite(self, suite, **kwargs): """This is the version from Django 1.7.""" return self.test_runner( verbosity=self.verbosity, failfast=self.failfast, no_colour=self.no_colour, ).run(suite)
This is the version from Django 1.7.
entailment
def generate_private_key(self): """ Generates a private key of key_length bits and attaches it to the object as the __private_key variable. :return: void :rtype: void """ key_length = self.key_length // 8 + 8 key = 0 try: key = int.from_bytes...
Generates a private key of key_length bits and attaches it to the object as the __private_key variable. :return: void :rtype: void
entailment
def generate_public_key(self): """ Generates public key. :return: void :rtype: void """ self.public_key = pow(self.generator, self.__private_key, self.prime)
Generates public key. :return: void :rtype: void
entailment
def generate_shared_secret(self, other_public_key, echo_return_key=False): """ Generates shared secret from the other party's public key. :param other_public_key: Other party's public key :type other_public_key: int :param echo_return_key: Echo return shared key :type bo...
Generates shared secret from the other party's public key. :param other_public_key: Other party's public key :type other_public_key: int :param echo_return_key: Echo return shared key :type bool :return: void :rtype: void
entailment
def requires_private_key(func): """ Decorator for functions that require the private key to be defined. """ def func_wrapper(self, *args, **kwargs): if hasattr(self, "_DiffieHellman__private_key"): func(self, *args, **kwargs) else: self.generate_private_key() ...
Decorator for functions that require the private key to be defined.
entailment
def requires_public_key(func): """ Decorator for functions that require the public key to be defined. By definition, this includes the private key, as such, it's enough to use this to effect definition of both public and private key. """ def func_wrapper(self, *args, **kwargs): if hasattr(self,...
Decorator for functions that require the public key to be defined. By definition, this includes the private key, as such, it's enough to use this to effect definition of both public and private key.
entailment
def print_debug(*args, **kwargs): """ Print if and only if the debug flag is set true in the config.yaml file. Args: args : var args of print arguments. """ if WTF_CONFIG_READER.get("debug", False) == True: print(*args, **kwargs)
Print if and only if the debug flag is set true in the config.yaml file. Args: args : var args of print arguments.
entailment
def print_time(self, message="Time is now: ", print_frame_info=True): """ Print the current elapsed time. Kwargs: message (str) : Message to prefix the time stamp. print_frame_info (bool) : Add frame info to the print message. """ if print_frame_info: ...
Print the current elapsed time. Kwargs: message (str) : Message to prefix the time stamp. print_frame_info (bool) : Add frame info to the print message.
entailment
def check_url(url): ''' Check if resource at URL is fetchable. (by trying to fetch it and checking for 200 status. Args: url (str): Url to check. Returns: Returns a tuple of {True/False, response code} ''' request = urllib2.Request(url) ...
Check if resource at URL is fetchable. (by trying to fetch it and checking for 200 status. Args: url (str): Url to check. Returns: Returns a tuple of {True/False, response code}
entailment
def get_base_url(webdriver): """ Get the current base URL. Args: webdriver: Selenium WebDriver instance. Returns: str - base URL. Usage:: driver.get("http://www.google.com/?q=hello+world") WebUtils.get_base_url(driver) ...
Get the current base URL. Args: webdriver: Selenium WebDriver instance. Returns: str - base URL. Usage:: driver.get("http://www.google.com/?q=hello+world") WebUtils.get_base_url(driver) #returns 'http://www.google.com'
entailment
def get_browser_datetime(webdriver): """ Get the current date/time on the web browser as a Python datetime object. This date matches 'new Date();' when ran in JavaScript console. Args: webdriver: Selenium WebDriver instance Returns: datetime - Py...
Get the current date/time on the web browser as a Python datetime object. This date matches 'new Date();' when ran in JavaScript console. Args: webdriver: Selenium WebDriver instance Returns: datetime - Python datetime object. Usage:: ...
entailment
def is_webdriver_mobile(webdriver): """ Check if a web driver if mobile. Args: webdriver (WebDriver): Selenium webdriver. """ browser = webdriver.capabilities['browserName'] if (browser == u('iPhone') or browser == u('android')): re...
Check if a web driver if mobile. Args: webdriver (WebDriver): Selenium webdriver.
entailment
def is_webdriver_ios(webdriver): """ Check if a web driver if mobile. Args: webdriver (WebDriver): Selenium webdriver. """ browser = webdriver.capabilities['browserName'] if (browser == u('iPhone') or browser == u('iPad')): return T...
Check if a web driver if mobile. Args: webdriver (WebDriver): Selenium webdriver.
entailment
def row_to_dictionary(header_row_web_element, row_webelement): """ Converts a row into a dictionary of key/values. (Note: assumes all rows/columns have uniform cells. Does not account for any row or column spans) Args: header_row_web_element (WebElement): W...
Converts a row into a dictionary of key/values. (Note: assumes all rows/columns have uniform cells. Does not account for any row or column spans) Args: header_row_web_element (WebElement): WebElement reference to the column headers. row_webelement (WebElement):...
entailment
def switch_to_window(page_class, webdriver): """ Utility method for switching between windows. It will search through currently open windows, then switch to the window matching the provided PageObject class. Args: page_class (PageObject): Page class to search for/instantia...
Utility method for switching between windows. It will search through currently open windows, then switch to the window matching the provided PageObject class. Args: page_class (PageObject): Page class to search for/instantiate. webdriver (WebDriver): Selenium webdriver. ...
entailment
def start_standby(cls, webdriver=None, max_time=WTF_TIMEOUT_MANAGER.EPIC, sleep=5): """ Create an instance of BrowserStandBy() and immediately return a running instance. This is best used in a 'with' block. Example:: with BrowserStandBy.start_standby(): # N...
Create an instance of BrowserStandBy() and immediately return a running instance. This is best used in a 'with' block. Example:: with BrowserStandBy.start_standby(): # Now browser is in standby, you can do a bunch of stuff with in this block. # ... ...
entailment
def start(self): """ Start standing by. A periodic command like 'current_url' will be sent to the webdriver instance to prevent it from timing out. """ self._end_time = datetime.now() + timedelta(seconds=self._max_time) self._thread = Thread(target=lambda: self.__stand...
Start standing by. A periodic command like 'current_url' will be sent to the webdriver instance to prevent it from timing out.
entailment
def temp_path(file_name=None): """ Gets a temp path. Kwargs: file_name (str) : if file name is specified, it gets appended to the temp dir. Usage:: temp_file_path = temp_path("myfile") copyfile("myfile", temp_file_path) # copies 'myfile' to '/tmp/myfile' """ if file_...
Gets a temp path. Kwargs: file_name (str) : if file name is specified, it gets appended to the temp dir. Usage:: temp_file_path = temp_path("myfile") copyfile("myfile", temp_file_path) # copies 'myfile' to '/tmp/myfile'
entailment
def create_temp_file(file_name=None, string_or_another_file=""): """ Creates a temp file using a given name. Temp files are placed in the Project/temp/ directory. Any temp files being created with an existing temp file, will be overridden. This is useful for testing uploads, where you would want to...
Creates a temp file using a given name. Temp files are placed in the Project/temp/ directory. Any temp files being created with an existing temp file, will be overridden. This is useful for testing uploads, where you would want to create a temporary file with a desired name, upload it, then delete the...
entailment
def download_to_tempfile(url, file_name=None, extension=None): """ Downloads a URL contents to a tempfile. This is useful for testing downloads. It will download the contents of a URL to a tempfile, which you then can open and use to validate the downloaded contents. Args: url (str) : URL...
Downloads a URL contents to a tempfile. This is useful for testing downloads. It will download the contents of a URL to a tempfile, which you then can open and use to validate the downloaded contents. Args: url (str) : URL of the contents to download. Kwargs: file_name (str): Name of...
entailment
def create_page(cls, webdriver=None, **kwargs): """Class method short cut to call PageFactory on itself. Use it to instantiate this PageObject using a webdriver. Args: webdriver (Webdriver): Instance of Selenium Webdriver. Returns: PageObject Raises: ...
Class method short cut to call PageFactory on itself. Use it to instantiate this PageObject using a webdriver. Args: webdriver (Webdriver): Instance of Selenium Webdriver. Returns: PageObject Raises: InvalidPageError
entailment
def create_page(page_object_class_or_interface, webdriver=None, **kwargs): """ Instantiate a page object from a given Interface or Abstract class. Args: page_object_class_or_interface (Class): PageObject class, AbstractBaseClass, or Interface to atte...
Instantiate a page object from a given Interface or Abstract class. Args: page_object_class_or_interface (Class): PageObject class, AbstractBaseClass, or Interface to attempt to consturct. Kwargs: webdriver (WebDriver): Selenium Webdriver to use to instantiate the ...
entailment
def __instantiate_page_object(page_obj_class, webdriver, **kwargs): """ Attempts to instantiate a page object. Args: page_obj_class (PageObject) - PageObject to instantiate. webdriver (WebDriver) - Selenium webdriver to associate with the PageObject Retu...
Attempts to instantiate a page object. Args: page_obj_class (PageObject) - PageObject to instantiate. webdriver (WebDriver) - Selenium webdriver to associate with the PageObject Returns: PageObject - If page object instantiation succeeded. True -...
entailment
def __itersubclasses(cls, _seen=None): """ Credit goes to: http://code.activestate.com/recipes/576949-find-all-subclasses-of-a-given-class/ itersubclasses(cls) Generator over all subclasses of a given class, in depth first order. >>> list(itersubclasses(int)) == [bool...
Credit goes to: http://code.activestate.com/recipes/576949-find-all-subclasses-of-a-given-class/ itersubclasses(cls) Generator over all subclasses of a given class, in depth first order. >>> list(itersubclasses(int)) == [bool] True >>> class A(object): pass >>> class B...
entailment
def check_css_selectors(webdriver, *selectors): """Returns true if all CSS selectors passed in is found. This can be used to quickly validate a page. Args: webdriver (Webdriver) : Selenium Webdriver instance selectors (str) : N number of CSS selectors strings to match ...
Returns true if all CSS selectors passed in is found. This can be used to quickly validate a page. Args: webdriver (Webdriver) : Selenium Webdriver instance selectors (str) : N number of CSS selectors strings to match against the page. Returns: True, False...
entailment
def wait_until_page_loaded(page_obj_class, webdriver=None, timeout=WTF_TIMEOUT_MANAGER.NORMAL, sleep=0.5, bad_page_classes=[], message=None, ...
Waits until the page is loaded. Args: page_obj_class (Class) : PageObject class Kwargs: webdriver (Webdriver) : Selenium Webdriver. Default uses WTF_WEBDRIVER_MANAGER's instance. timeout (number) : Number of seconds to wait to allow the page to load. sl...
entailment
def wait_until_page_ready(page_object, timeout=WTF_TIMEOUT_MANAGER.NORMAL): """Waits until document.readyState == Complete (e.g. ready to execute javascript commands) Args: page_object (PageObject) : PageObject class Kwargs: timeout (number) : timeout period """...
Waits until document.readyState == Complete (e.g. ready to execute javascript commands) Args: page_object (PageObject) : PageObject class Kwargs: timeout (number) : timeout period
entailment