New question #246694 on Sikuli:
https://answers.launchpad.net/sikuli/+question/246694
I have successfully able to configure Sikuli with Selenium Web Driver. When I
tried to automate calculator I was properly able to open calculator and click
on the buttons.
However, when I am not able to validate the value in textbox of calculator.
Below is my code:
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;
import org.sikuli.script.*;
import org.sikuli.script.internal.hotkey.*;
import org.sikuli.script.natives.*;
import org.testng.internal.PropertiesFile;
public class SikuliTest {
public static void main(String[] args) throws IOException, FindFailed,
InterruptedException {
Properties deskIcon = new Properties();
deskIcon.load(new
FileInputStream("D:\\SeleniumPractice\\WebandDesk\\OR\\PropertyFiles\\DeskIcons.properties"));
Screen scrn = new Screen();
App.open("calc.exe");
scrn.click(deskIcon.getProperty("Calc1"), 100);
scrn.click(deskIcon.getProperty("Calc0"), 100);
scrn.click(deskIcon.getProperty("Calc0"), 100);
scrn.click(deskIcon.getProperty("CalcPlus"), 200);
scrn.click(deskIcon.getProperty("Calc1"), 100);
scrn.click(deskIcon.getProperty("Calc0"), 100);
scrn.click(deskIcon.getProperty("Calc0"), 100);
scrn.click(deskIcon.getProperty("CalcEqul"), 200);
if (deskIcon.getProperty("Calc_Scrn").contains("200")){
System.out.println("Pass");
}
else{
System.out.println("Fail");
}
}
}
The if condition is not working properly. It's not validating the value in
textbox image (Calc_Scrn).
Please suggest how we can validate it.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.
_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp