sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #33191
Re: [Question #268487]: Problems with type() and END key
Question #268487 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/268487
Status: Needs information => Solved
Daniel Kurtz confirmed that the question is solved:
To answer my own question, the problem is that focus is on a control on
the page, and therefor the END press is acting only in the context of
that control. IOW, it's going to the end of the text box, or the end of
the list, not to the end of the page/window. I forgot that one of the
things I did in moving the code into PyDev was to move that command from
the FIRST thing I did on the window until just before I need to find the
element that is (occasionally) scrolled out of view.
So, I went from:
App.focus()
type(Keys.End)
click('radiobutton1.png')
type('textbox1.png', 'Harry Potter')
click('savebutton.png')
Which worked, to:
App.focus()
click('radiobutton1.png')
type('textbox1.png', 'Harry Potter')
type(Keys.End)
click('savebutton.png')
Which didn't, because the focus was on 'textbox1' so I was just jumping
to end of 'textbox1'.
For the moment I'm just maximizing the window, which makes sure the
elements I need are in view about 9.5 times out of 10. To get those last
.5, I'll do something else. I'm guessing I can just repeat App.focus().
Also I realize that I'm going to need <Control>-<End>, since <End> by
itself just operates in 1 dimension on this app.
ddk
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.