Direct answer
Do not design it as “local script connects to remote browser”. What we provide is two remote desktop methods, UU Remote and RustDesk, with no automation port open to the outside; the workable approach is to run the scripts on the remote Mac itself.
Basis
- The remote mode of frameworks such as Selenium and Playwright needs your computer to open a connection to a port on the remote machine. The machine is on residential broadband and the public exit may be shared with other machines, so there is no assurance that it can be reached from outside, and you must not change the network configuration or set up port mapping for this.
- Reverse the order and the problem goes away: pull the code onto the remote Mac with Git and run the tests in its terminal. The browser is driven locally on that machine, and requests still go out over the United States broadband line.
- The customer account can install Node, Python and the test frameworks. Safari includes
safaridriver; it can be used only after you run the one-time enable command as Apple describes and allow remote automation in Safari's developer settings. See Apple's WebDriver documentation. - Results travel in the outbound direction: push test reports, screenshots and recordings to your code repository, object storage or CI system, with no inbound connection needed.
Boundaries: when the answer is different
You can turn on Remote Login yourself in System Settings, but whether it is reachable from the public internet is as stated in the delivery notes; check with support before ordering and do not assume it works. Do not install tunneling tools, proxies or anything else that changes the exit or maps ports to the outside; if you want to use mesh-networking software, check with support before installing it. Registering the machine as a self-hosted runner for your CI system is another route, in which the machine itself connects outward to fetch jobs; see the always-on build machine page for whether it suits you. Keep the test frequency restrained: high-frequency automated access to, or scanning of, sites that are not yours is a prohibited use, and heavy load testing of your own service also affects the other machines on the same exit.
How to do it
- Connect to the machine through the remote desktop and install the runtime and the test framework.
- To test Safari, enable
safaridriverfollowing Apple's documentation and turn on the option that allows remote automation. - Pull the test code with Git and get one test case passing by hand first.
- Run the whole suite inside a tmux session or a scheduled job, with output written to a log.
- At the end of the script, push the report and screenshots to your own repository or storage.
Related questions
- How can I test my site or app from a US network? Rent a real Mac in the United States
- Rented Mac mini as an always-on build machine for small teams? Count your build minutes first
- Coding on a remote Mac mini: remote desktop or terminal?
- How to keep long tasks running on a remote Mac mini after you disconnect
- Can I rent a remote Mac just to test Safari compatibility?
Use case
This question belongs to the use case: How can I test my site or app from a US network? Rent a real Mac in the United States
Other questions in the same use case:
- Can several people on a test team share one remote Mac in the United States?
- How do I show in a test report that the test was run on a US network?
- Machine is in the United States, so why does a site show another region or language?
- What is the minimum rental period? Can I rent a Mac mini by the day or week?
Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support