← Back to team overview

sikuli-driver team mailing list archive

[Question #272241]: Help to click on image based on text info observed

 

New question #272241 on Sikuli:
https://answers.launchpad.net/sikuli/+question/272241

Hello team,

I am working on a web based app. that has applet within it. I am using Selenium Java and Sikuli for automation testing. In the web page that contain applet, the UI is depicted as shown below (I have depicted this as text):

Idle               Run_Icon           Edit_Icon           Info_Icon           Cross_Icon
Active          Run_Icon           Edit_Icon           Info_Icon           Cross_Icon

NOTE: The *_Icon are images that are rendered on Applet. This is in PNG format.

I am able to find Run_Icon using following technique using Sikuli:
matches = s.findAll("img/ESRSrun.PNG");
if(m.exists("img/ESRSrun.PNG")  != null){
        if(m.getScore() > 0.9){
                     m.click();
	             System.out.println("clicked active state...");
	}
}

I am able to find text called using Match textMatch = s.find("Idle");
My requirement is to click on the Run_Icon only when the text reads Idle as text. 

Question : How to I measure and move the mouse cursor towards right of text called "Idle" and click on "Run_Icon"

Please share your inputs and ideas. 
Thank you
Saravanakumar

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.