애플 리케이션을 전환 할 때 UI 자동화를 사용하여 UIPasteboard
에서 글쓰기 및 읽기를 테스트하려고합니다. 그러나 두 번째 앱으로 전환하면 스크립트가 중단됩니다. 나는 교수형에 처하는 것을 막기 위해 잠을 자려고 노력하고있다. waitForInvalid
및 pushTimeout/popTimeout
을 사용해 보았습니다. 두 가지 방법 모두 작동하지 않는 것으로 보이고 두 번째 앱에서 logElementTree
으로 이동하기 전에 테스트가 중단됩니다.iOS UIAutomation : 애플 리케이션 전환
내 UI 자동화 스크립트는 waitForInvalid
입니다. 스크립트가 pushTimeout/popTimeout
를 사용하고 여기
var target = UIATarget.localTarget();
target.frontMostApp().mainWindow().segmentedControls()[0].buttons()["1MB"].tap();
target.frontMostApp().mainWindow().buttons()["Pasteboard Sharing"].tap();
UIATarget.localTarget().frontMostApp().mainWindow().buttons()["Paste & Go"]
.tap();
UIATarget.localTarget().frontMostApp().mainWindow().buttons()["Paste & Go"]
.waitForInvalid();
target.frontMostApp().mainWindow().logElementTree();
: 그리고 만약 내가 제대로 이해하고
var target = UIATarget.localTarget();
target.frontMostApp().mainWindow().segmentedControls()[0].buttons()["1MB"].tap();
target.frontMostApp().mainWindow().buttons()["Pasteboard Sharing"].tap();
UIATarget.localTarget().frontMostApp().mainWindow().buttons()["Paste & Go"]
.tap();
UIATarget.localTarget().pushTimeout(10);
UIATarget.localTarget().frontMostApp().mainWindow().buttons()["Check Pasteboard"]
.withValueForKey(1, "isVisible");
UIATarget.localTarget().popTimeout();
target.frontMostApp().mainWindow().logElementTree();
또한 Appium은 백그라운드에서 UIAutomation을 사용합니다. 따라서 한계는 동일하게 유지됩니다. Android (appium 포함 또는 제외)에 적합하지만 –