import GboxSDK from "gbox-sdk";const gboxSDK = new GboxSDK({ apiKey: process.env["GBOX_API_KEY"] // This is the default and can be omitted});async function main() { const box = await gboxSDK.create({ type: "android" }); // Get screen layout await box.action.clipboard.set("Hello, world!"); // Print clipboard content console.log(await box.action.clipboard.get());}main();
UI Action
Set clipboard
Set the clipboard content
POST
/
boxes
/
{boxId}
/
actions
/
clipboard
JavaScript
Copy
import GboxSDK from "gbox-sdk";const gboxSDK = new GboxSDK({ apiKey: process.env["GBOX_API_KEY"] // This is the default and can be omitted});async function main() { const box = await gboxSDK.create({ type: "android" }); // Get screen layout await box.action.clipboard.set("Hello, world!"); // Print clipboard content console.log(await box.action.clipboard.get());}main();