print '*** testTest2171 ***'

from org.netbeans.jemmy.operators import JFrameOperator, JLabelOperator, JTextFieldOperator, JButtonOperator, DialogOperator
import org.netbeans.jemmy.TimeoutExpiredException
from org.netbeans.jemmy import QueueTool
from org.autoplot.util.jemmy import RegexComponentChooser
from org.virbo.autoplot import AutoplotUI

from java.io import File
print 'write file to ', File('.').getAbsolutePath()

def sleeping(d,msg=''):
   setStatus( 'busy: sleeping...%d %s' % ( d, msg ) )
   for i in xrange(d/100):
      sleep(100)
      setStatus( 'busy: sleeping...%d %s' % (d-i*100,msg) )

app= getViewWindow()
mainFrame = JFrameOperator(app)

uri= "file:/home/jbf/ct/hudson/vap/usageMap.tsb.versions.Aug8.vap?timerange=2019-may"
JTextFieldOperator( app.getDataSetSelector().getEditor() ).setText(uri)
JButtonOperator( app.getDataSetSelector().getGoButton() ).push()

waitUntilIdle()

writeToPng('test2171.png')

sleep(100)

print 'okay'
sleeping(1000)

from java.lang import System
System.exit(0)