MCPcopy Index your code
hub / github.com/microsoft/playwright-python / _drop

Method _drop

playwright/_impl/_frame.py:842–867  ·  view source on GitHub ↗
(
        self,
        selector: str,
        payload: "DropPayload",
        strict: bool = None,
        position: Position = None,
        timeout: float = None,
    )

Source from the content-addressed store, hash-verified

840 )
841
842 async def _drop(
843 self,
844 selector: str,
845 payload: "DropPayload",
846 strict: bool = None,
847 position: Position = None,
848 timeout: float = None,
849 ) -> None:
850 params: Dict[str, Any] = {
851 "selector": selector,
852 "strict": strict,
853 "position": position,
854 "timeout": self._timeout(timeout),
855 }
856 files = payload.get("files") if payload else None
857 if files is not None:
858 converted = await convert_input_files(files, self.page.context)
859 if "directoryStream" in converted or "directoryLocalPath" in converted:
860 raise Error(
861 "Dropping a directory is not supported, pass individual files instead."
862 )
863 params.update(converted)
864 data = payload.get("data") if payload else None
865 if data is not None:
866 params["data"] = [{"mimeType": k, "value": v} for k, v in data.items()]
867 await self._channel.send("drop", self._timeout, params)
868
869 async def type(
870 self,

Callers 1

dropMethod · 0.80

Calls 6

_timeoutMethod · 0.95
convert_input_filesFunction · 0.90
ErrorClass · 0.90
getMethod · 0.45
itemsMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected