← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #217868]: How to recognized 2 identical controls on page?

 

Question #217868 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/217868

    Status: Needs information => Solved

priyank confirmed that the question is solved:
Hello All,

My sincere apologies for multiple post. My problem gets resolved. There
is nothing different solution which RaiMan said here but I just need to
change code based on my application.

In My application, As said, we have two similar file upload control in
sequence hence it was creating the problem.

1.	Resume file upload 
2.	Sample file upload

So What I did is, I find match and create region of sample control
(Which I don’t want to work with) and use above() method.

http://doc.sikuli.org/region.html

Above URL has really helped me out.

So code would look like,


                        Match m = s.find("..//Test Data//Sample.png");              //Sample file upload control.
			Region r = m.above();
			r.click("..//Test Data//ResumeBar.png");                        //Input of Resume file upload
			
			s.wait("..//Test Data//WaitPopup.png");
			s.click("..//Test Data//Textbox.png", 0);
			s.type(null, "E:\\Test Data\\Textbox.png", 0);
			s.click("..//Test Data//OpenButon.png", 0);

Thanks a lot !!!!!

- PRIYANK

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.