Skip to content

Commit

Permalink
优化tidevice中wda路径被写死的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
373743261 committed Feb 1, 2021
1 parent 328c635 commit 280758e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tidevice/_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,11 +776,13 @@ def _launch_wda(self,

app_container = app_info['Container']

xctest_path = "/tmp/WebDriverAgentRunner-" + str(session_identifier).upper() + ".xctestconfiguration" # yapf: disable
target = app_info.get("CFBundleName").split("-")[0]
xctest_path = "/tmp/{}-".format(target) + str(
session_identifier).upper() + ".xctestconfiguration" # yapf: disable
xctest_content = bplist.objc_encode(bplist.XCTestConfiguration({
"testBundleURL": bplist.NSURL(None, "file://" + app_info['Path'] + "/PlugIns/WebDriverAgentRunner.xctest"),
"testBundleURL": bplist.NSURL(None, "file://" + app_info['Path'] + "/PlugIns/{}.xctest".format(target)),
"sessionIdentifier": session_identifier,
})) # yapf: disable
})) # yapf: disable

fsync = self.app_sync(bundle_id)
for fname in fsync.listdir("/tmp"):
Expand Down

0 comments on commit 280758e

Please sign in to comment.