INNER CODE UNIT · Python

op_get_attribute

feder-cr/invisible_playwright · src/invisible_playwright/_juggler/server.py:299

    def op_get_attribute(self, params: Dict) -> Any:
        return {"value": self.injected.get_attribute(
            self.frame.frame_id, self.object_id, params["name"])}

    def op_get_property(self, params: Dict) -> Any:
        object_id = self.injected.call(
            self.frame.frame_id,
            "(injected, o, n) => o[n]",
            {"objectId": self.object_id}, params["name"], by_value=False)
        handle = ElementHandleDispatcher(self.server, self.frame, object_id)
        return {"handle": handle.channel}

    def op_get_property_list(self, params: Dict) -> Any:
        """⛔ ONE HANDLE PER PROPERTY, and each one holds its value alive. On a
        large object this is the most expensive call in the file, which is why
        `json_value` exists and should be preferred when the values are
        serialisable."""
        names = self.injected.call(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…