Question #699003 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/699003
Hans Steenblok posted a new comment:
void type(String text) {
addScreenShot();
log(String.format("type \"%s\"", printable(text)));
screen.type(text);
}
void typeFieldTAB(Pattern p, String text) throws NotFound {
addScreenShot();
logp("type \"" + text + "\" en TAB uit veld", p);
long start = now();
screen.type(p, text);
screen.type(p, Key.TAB); // screen.type(Key.TAB) makes no difference)
logm(screen.getLastMatch(), start);
}
void typeTAB(String text) {
addScreenShot();
log(String.format("type \"%s\" en TAB", printable(text)));
screen.type(text);
screen.type(Key.TAB);
}
private void addScreenShot() {
screen.sleep(DELAY_SHORTLY);
HtmlLogger.addScreenShot(screen.captureLimited(1400, 768),
this.getClass().getName());
}
.
.
// main function
type("p");
typeFieldTAB(achternaamPattern, naam);
typeTAB(voorletters);
typeTAB(""); // voorvoegsel
typeTAB(geslacht);
.
.
functions like typeFieldTAB are wrapper functions to add logging and to make a
screenshot to check every step)
We create the pattern's at the beginning of the test. We have lots of
scenario's. The log* functions only log data.
The code worked perfectly in sikuly 1.1.2 and is not working in sikuli 2.0.5.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.
_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp