Unable to match the image using "exists" method
Hi there,
I tried sikuli to handle browser Authentication pop up. I am able to enter the username and password in authentication pop up. But the problem that i am facing now is unable to match the image using exists method.
I need to compare multiple images (say: There will be 'A', 'B', 'C' images) if A does not exists, It has to match the image of B and C. When is the condition is satisfied, it has to do appropriate action.
Code:
import org.sikuli.
import org.sikuli.
import org.sikuli.*;
public class AuthenticationH
public static void main(String[] args) {
Screen s = new Screen();
try{
Match b= s.find(
Match c= s.find(
Match d= s.find(
Match a= s.find(
Match e= s.find(
if(s.exists(
{
System.
s.
s.
s.click(d);
}
else if(s.exists(
{
System.
s.click(d);
}
System.
s.click(d);
}
}
}
}
}
Problem here is Always the first condition is entered. Because exists method returns some value even the appropriate image is not displayed on the screen. What would be the best alternative for exists method or How can be the exists method used to solve my problem.
Please answer my question at the earliest.
Thanks,
Vinoth
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Vinoth for more information if necessary.