← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #701201]: How to create a banner for the test run?

 

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

RaiMan proposed the following answer:
Currently there is no such feature available (Is on the list for 2.0.6).

You can do the following workaround:

where = Region(300, 300, 1, 1)

def blocker(loc):
    Do.popError("Do not touch anything\nJust watch", loc)

import thread

# create a popup at the specified location (popup center)
thread.start_new_thread(blocker, (where,))

wait(3) # here comes your payload

# this will close the popup
click(where)
type(Key.ENTER)

wait(3) # more payload

This solution currently has a caveat: each popup creates an undecorated
frame (size 2x2, tiny window), that will not be disposed when the popup
closes. the tiny windows vanish, when the IDE shuts down.

If this tiny problem is a problem: from SikuliX scripts the complete
Java world is useable: create your own JFrame with a text label, make it
visible, move it around and close it as needed.

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