나는 휴대 전화 번호에 대한 일부 녹음을 검색하고 gridview에서 여러 녹음을 찾는 자바 스크립트 자동화를 작성하고 있습니다. 다음으로 다운로드 (여러 개) 버튼을 클릭하여 모든 녹음을 다운로드하려고합니다. 내가 코드를 아래에 작성했지만java와 sikuli 화면에서 여러 번 나타나는 이미지를 클릭하는 방법은 무엇입니까?
public static Screen s = new Screen();
Iterator <Match> matches =s.findAll("downloadbtn_wh.png"); // s is screen
Pattern pButton = new Pattern("downloadbtn_wh.png");
Match mButton;
while (matches.hasNext()) {
Match m = matches.next(); // m now could be inspected with debugging
s.click(m); // click on drop-down
if ((mButton = s.exists(pButton))!=null) {
// checks for button image and saves the match
s.click(mButton); // just click the match, do not search again
break;
}
}
이 스크립트는 처음 다운로드 버튼을 클릭 한 후 중지 작동하지 않습니다하지만 난 그게있는 gridview의 모든 다운로드 버튼을 클릭한다 기대합니다. Images
@ 스티브 정확히 작동하지 않는 것은 무엇입니까? 오류? –
Worked !!!!! 감사합니다 Eugene !!!!!! highlight() 대신 click()을 추가했습니다. – Steve
@ 스티브 도움이된다는 소식을 듣고 기뻤습니다. 제 대답을 받아주세요. –