sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #23991
[Question #243473]: Sikuli enters text in wrong field although correct match is present
New question #243473 on Sikuli:
https://answers.launchpad.net/sikuli/+question/243473
I'm relatively new to Sikuli and I'm having a problem with entering text into a textfield. I'm using the sikuli-script.jar in version sikulix 1.0.1 within Eclipse IDE to write JUnit-based tests.
My problem is as follows:
At the beginning, I want to focus on a textfield using a previously taken screenshot and enter some text. This works fine.
On the same screen, right beneath this textfield, there is a second textfield, in which I'd also like to enter some text.
The text for the second textfield always gets entered into the first, too.
Here's a snippet from my script demonstrating the problem:
App app = App.focus("My Window");
Region wholeApp = app.window();
wholeApp.type("textfield_1.png", "text_1");
wholeApp.type("textfield_2.png", "text_2");
...
I always end up having the text "text_1 text_2" inside textfield_1, and no changes in textfield_2.
Interestingly, when I log the match for the second textfield to the console, it always outputs the correct one, i.e.
wholeApp.find("textfield_2.png")
detects the correct textfield. Then why is the text always entered into the wrong one?
The only difference between the two textfields is that the second one is prefilled with some content. Might this be the problem?
Has anyone experienced a similar problem and found a solution to that?
Thanks in advance!
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.