appium / appium-mac2-driver

Next-gen Appium macOS driver, backed by Apple XCTest
Apache License 2.0
115 stars 24 forks source link

Help: How to designate IP and port of WebDriverAgentMac #212

Closed pppppino closed 1 year ago

pppppino commented 1 year ago

when i start session, appium will run "xcodebuild WebDriverAgentMac.xcodeproj -scheme WebDriverAgentRunner", but it's service is running on "127.0.0.1:10100". so I want to know, how to designate ip and port in command line, such as 192.168.12.19:10101

KazuCocoa commented 1 year ago

Please try out appium:systemPort and appium:systemHost

pppppino commented 1 year ago

@KazuCocoa , Thanks a lot, I know the method above, this method will start appium session at the same times, which is not suitable in my usage scenarios! I wanna know how to designate ip and port by xcodebuild in command line before start the session of appium, since I wanna use "appium:webDriverAgentMacUrl" , which means: Firstly, start WebDriverAgentMac by xcodebuild, Secondly, start appium session with disignated webDriverAgentMacUrl

KazuCocoa commented 1 year ago

https://github.com/appium/appium-mac2-driver/blob/98bceeb5260dbf7823fdea8454f5a7c73f3536ba/lib/wda-mac.js#L224-L237 might help. So it gives USE_PORT and USE_HOST as environment variables for the build command

pppppino commented 1 year ago

@KazuCocoa Thank you so much, it works!