I have many devices connected to my mac, and I try to run programs on them.
For a device, I see it can have two ip.
- The ip from USB, I usually get such ip by connecting the iphone to the mac. so something like
169.254.xxx.xxx
, usually I get this througharp -a
- The ip from wifi, for example
192.168.1.xxx
I don’t want to reinstall and run webdriveragent each time, but rather have webdriveragent run continuously. I start the webdriveragent with
xcodebuild test-without-building \
-xctestrun ./DerivedData/${iphone_id}/Build/Products/WebDriverAgentRunner_iphoneos18.2-arm64.xctestrun \
-destination "id=${iphone_id}"
And also set the webDriverAgentUrl
. For example, for usb ip, this always works.
"appium:webDriverAgentUrl": "http://169.254.xxx.xxx:8100"
However, with wifi ip, it does not work.
"appium:webDriverAgentUrl": "http://192.168.1.xxx:8100"
I run curl http://192.168.1.xxx:8100/status
, and it could not connect. but ping 192.168.1.xxx
works.
USB is actually not that stable (sometimes requires one to unplug and plug it in again), so I would like to use the wifi IP. How would I go about this?