← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #161633]: Click on textbox & then use type function will append Some Garbage char in start of text.

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
**** first a comment on your coding:

-->Search Text box.-------->Region r1 = s.exists(Image,5);
-->click Textbox.------------->r1.click(Image,0);
-->Enter Text------------------>r1.type(Image,otp,0)

-- already the s.exists() returns a match, that you store in r1 - so you
should use s.click(r1,0), to avoid the additional find operation.

-- r1.type(Image,otp,0) does a click internally

so your sequence could be:
Region r1 = s.exists(Image,5);
s.type(r1,otp,0);

... and you should check, wether image was found, before firing the type
;-)

**** your question
this might be an effect of your additional click. 
If the above recommended code does not help, try paste() instead of type()

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