简体   繁体   中英

Sikuli no clicking on Image in POP UP

hi guys i am facing a problem .My script is using sikuli API for image based automation .My problem is i click a button "A" then a pop up appears then i want to click an image B sikuli gets coordinates of B correctly but when it calls click there is null pointer exception shown . I know what is problem but i don't know its solution.Script is not able to click because current focus of sikuli is on previous screen containing button A so it say null pointer exception .Any one knows how to switch focus to active screen ?

要专注于弹出窗口,可以使用:

App.focusedWindow()

by adding long wait solved my problem :

try {
                    driver.wait(2000);

                } catch (InterruptedException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM