Run Script
Runs an Appium script you already have, on the phone this run is already holding. One line changes — the server address — and the rest of the file stays as it is.
Run an Appium script you already have, on the phone this run is already holding. Point it at $REMONODE_APPIUM_URL and the rest of the file stays as it is.
Reach for it when
- You arrived with a working Appium suite and would rather not redraw it as thirty blocks to try this out.
- One awkward stretch of a flow is already written in code, and the rest is easier as blocks.
- You want the schedule, the alerts, the AI check and the multiple phones around a script you trust.
Every setting this block has. A field marked only when appears once you have chosen the mode above it — those are alternatives to each other, not extra things to fill in.
- LanguageRequiredstarts at Python (Appium-Python-Client)
The client library your script imports. Both are pre-installed, pinned — a script that passes today runs the same way in six months.
Python (Appium-Python-Client)Node (WebdriverIO) - ScriptRequiredstarts at import os from appium import webdriver from appium.options.android import UiAutomator2Options # The one line that changes: the server comes from the run, not from a hard-coded address. driver = webdriver.Remote(os.environ["REMONODE_APPIUM_URL"], options=UiAutomator2Options()) try: print("elements on screen:", len(driver.find_elements("xpath", "//*"))) driver.save_screenshot(os.environ["REMONODE_ARTIFACTS"] + "/screen.png") finally: driver.quit() # ends this script, not the run
Your script, as it is. Replace the Appium server address with os.environ["REMONODE_APPIUM_URL"] — capabilities are ignored, so leave them.
only when Language = Python (Appium-Python-Client)
- ScriptRequiredstarts at import { remote } from "webdriverio"; // The one line that changes: the server comes from the run, not from a hard-coded address. const url = new URL(process.env.REMONODE_APPIUM_URL); const driver = await remote({ protocol: "http", hostname: url.hostname, port: Number(url.port), path: url.pathname, capabilities: { platformName: "Android" }, }); console.log("page source:", (await driver.getPageSource()).length, "bytes"); await driver.saveScreenshot(`${process.env.REMONODE_ARTIFACTS}/screen.png`); await driver.deleteSession(); // ends this script, not the run
Your script, as it is. Take the server address from process.env.REMONODE_APPIUM_URL — including its path, which carries this run's token.
only when Language = Node (WebdriverIO)
- Time limitstarts at 300s
How long the script may run before the step ends it. It is enforced from outside, so a script that hangs cannot hold the phone past this.
- Memorystarts at 512 MB
Past this the script is stopped. Raise it only if a script really holds that much at once.
256 MB512 MB1 GB - Environmentstarts at —
One "NAME = value" per line, readable from the script. Values may reference earlier steps with {{ }}. Nothing else from the worker is visible — not our keys, not another run.
Paste the script, then change one line
Wherever it says http://localhost:4723 (or a Grid address), read the server from REMONODE_APPIUM_URL instead. Leave the capabilities block alone — the run's phone is already chosen, so it is ignored rather than obeyed.
Run ScriptSettings LanguagePython (Appium-Python-Client)ScriptRequireddriver = webdriver.Remote( os.environ["REMONODE_APPIUM_URL"], options=UiAutomator2Options(), )It starts where the last block left off
The script is handed the session this run is already using — the build you installed, the account you logged in with, the screen the previous block left open. It is a step in the flow, not a fresh test.
Launch AppRun ScriptRun ScriptAnalyze with AISend EmailLeave your teardown exactly as it is
driver.quit() ends your script, not the run. The next block still has the phone. So do finally: blocks, pytest fixtures and afterEach hooks — nothing has to be deleted for the script to behave here.
what the run does with your script's calls - webdriver.Remote(...)hands over the running session
- find_element / tap / typegoes to the real phone
- driver.quit()ends the script — the run keeps the device
Pass values in, hand values back
Environment takes NAME = value lines, and those may reference earlier blocks with {{ }}. Write JSON to REMONODE_OUTPUT and later blocks can read the fields off this step; save a screenshot into REMONODE_ARTIFACTS and it comes back with the run.
the four names your script gets - REMONODE_APPIUM_URLthe server to connect to
- REMONODE_OUTPUTwrite JSON here → the next block reads it
- REMONODE_ARTIFACTSsave files here → they come back with the run
- (yours)whatever you put in Environment
Watch it the way you watch every other block
Every command the script sends passes through the run, so the step reports what it actually did and how long each call took — not just a pile of stdout at the end.
the step's report Script (python) finished in 6.2s 9 WebDriver commands: POST /session → 200 (session lent) GET /session/:id/source → 200 150ms GET /session/:id/screenshot → 200 1.2s
plus anything your script printed
- Whatever your script wrote to REMONODE_OUTPUT, as fields later blocks can reference.
- exitCode, how long it ran, and the list of files it left behind.
- A screenshot, if the script saved one into REMONODE_ARTIFACTS.
- The server URL carries a path as well as a port. In WebdriverIO pass url.pathname as `path` — dropping it is the usual cause of a script that cannot connect.
- The script runs sealed in: no access to the machine running it, no credentials of ours, and no way back to anything but the phone. Anything it needs has to arrive through Environment.
- A script that hangs is stopped at the Time limit, and the step goes red. Set that limit to something you would actually wait for.
- Only Appium-Python-Client / selenium / pytest / requests (Python) and webdriverio (Node) are installed. A script that imports your own helper package will not find it yet.
- Running a device command (Android): pass the program and its arguments separately — {command: "settings", args: ["get", "system", "screen_off_timeout"]}. The `sh -c "one long string"` form looks the same and is not: a Pixel refuses it and a Galaxy runs the first word with no arguments.
- It drives one device — the one this branch is holding. To run it on three phones, let the trigger fan out and this block runs once per phone.