Press and hold mouse button
computers.mouse_down(strid, ComputerMouseDownParams**kwargs) -> ActionResult
POST/computers/{id}/mouse-down
Press and hold the left mouse button at the specified x,y coordinates. Coordinates are screenshot pixel positions. Optionally specify tab_id (browser sessions only)
Parameters
id: str
tab_id: Optional[str]
x: Optional[float]
y: Optional[float]
Returns
Press and hold mouse button
import os
from tzafon import Lightcone
client = Lightcone(
api_key=os.environ.get("TZAFON_API_KEY"), # This is the default and can be omitted
)
action_result = client.computers.mouse_down(
id="id",
)
print(action_result.executed_tab_id){
"error_message": "error_message",
"executed_tab_id": "executed_tab_id",
"page_context": {
"device_scale_factor": 0,
"is_main_tab": true,
"page_height": 0,
"page_width": 0,
"scroll_x": 0,
"scroll_y": 0,
"tab_id": "tab_id",
"title": "title",
"url": "url",
"viewport_height": 0,
"viewport_width": 0
},
"request_id": "request_id",
"result": {
"foo": "bar"
},
"status": "status",
"timestamp": "timestamp"
}Returns Examples
{
"error_message": "error_message",
"executed_tab_id": "executed_tab_id",
"page_context": {
"device_scale_factor": 0,
"is_main_tab": true,
"page_height": 0,
"page_width": 0,
"scroll_x": 0,
"scroll_y": 0,
"tab_id": "tab_id",
"title": "title",
"url": "url",
"viewport_height": 0,
"viewport_width": 0
},
"request_id": "request_id",
"result": {
"foo": "bar"
},
"status": "status",
"timestamp": "timestamp"
}