← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #699003]: after screen.type(pattern., "text") and screen.type(pattern, Key.Tab) focus is set to previous component instead of next

 

Question #699003 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/699003

    Status: Open => Answered

RaiMan proposed the following answer:
screen.type(ptrn, text);

searches the pattern, if found clicks the match's middle and then types
the given text

In your case, I doubt, that the pattern can still be found with the next screen.type(ptrn, Key.TAB); 
If not found. type(pattern, sometext) simply does nothing without any error message.

my suggestion:

screen.type(ptrn, text); // position in the field and write the text
screen.type(Key.TAB); // send a tab to the focused GUI element

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