Why to use useXctestrunFile capability?
Use Xctestrun file to launch WDA. It will search for the file specified in the bootstrapPath capability. Expected name of the file is WebDriverAgentRunner_iphoneos-arm64.xctestrun for real devices and WebDriverAgentRunner_iphonesimulator-x86_64.xctestrun for simulators. One can do build-for-testing for WebDriverAgent project for simulators and real devices and then you will see Product Folder like this and you need to copy content of this folder at bootstrapPath. Since, this capability expects that you have already built the WDA project, it neither checks whether you have necessary dependencies to build WDA nor does it try to build the project.