Java: how to wait specific time after each type

Asked by jerome on 2018-02-28

I just have multiple action , i need to wait some interval of time for every action.

And also Wait function, Waitvanish is not properly wait for the image in Eclipse, then moved to the next action.

Code:

                        s.type(descripion);
   robot.keyPress(KeyEvent.VK_TAB);
   s.wait((double) 0.2);
   robot.keyPress(KeyEvent.VK_TAB);
   s.wait((double) 0.2);
   String version = "1.0";
   s.type(version);
   s.wait((double) 0.2);
   robot.keyPress(KeyEvent.VK_TAB);
   s.wait((double) 0.2);
   String fileDisposition = row.getCell(7).toString();
   s.type(fileDisposition);
   robot.keyPress(KeyEvent.VK_TAB);
   s.wait((double) 0.2);
                        .
                        .
                        . . . . .etc

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2018-02-28
Last reply:
2018-03-02
RaiMan (raimund-hocke) said : #1

There is no general feature "wait x after each action".

--- question:
why do you use
robot.keyPress(KeyEvent.VK_TAB);
instead of
type(Key.TAB)
???

You could just create a new class extending the class Region and add a typeAndWait() method, that types and waits.

Can you help with this problem?

Provide an answer of your own, or ask jerome for more information if necessary.

To post a message you must log in.