컨트롤 목록을 반복 할 수있는 방법과 각 테스트마다 동일한 테스트를 실행할 수있는 방법이 있습니까? 예 : 생성 된 버튼 목록이 있습니다. 각 버튼을 눌러 기능을 확인하고 싶습니다. 어떻게해야합니까?SAPUI5/OPA5 테스트 : 여러 컨트롤을 반복하는 방법
시작 시나리오 : 아무도 여기에 도움이 될 수 있음을
var buttons = readAllButtonsOfList(); opaTest("Test if popover is closing.", function (Given, When, Then) { Given .iStartMyAppInAFrame(linkTestPage); for(var i = 0; i < buttons.length; i++) { When .onTheTestPage .iPressAButton(buttons[i]); Then .onTheTestPage .iShouldSeeTheRequiredAction(buttons[i]); } } });
희망 :
opaTest("Test if popover is closing.", function (Given, When, Then) { Given .iStartMyAppInAFrame(linkTestPage); When .onTheTestPage .iPressAButton(); Then .onTheTestPage .iShouldSeeTheRequiredAction(); });
나는 그런 일을해야합니다. 더 많은 버튼을 눌러 계속하면서