Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 193 → Rev 194

/trunk/test.sh
New file
0,0 → 1,65
# Scenario nominal : saisie observation avec completion commune et espece, tous champs renseignes
 
# Necessite xdotool >= 20090815 (commande delay)
 
# Todo : en faire une brique pour inclusion dans autres scenario
 
# Lancement Cel
firefox http://localhost/cel/www/org.tela_botanica.cel2/cel2.html
sleep 4
 
# Timestamps
 
obsid=`date +%s`
 
# Init
CWID=`xdotool getwindowfocus`
WID=`xdotool search "Mozilla Firefox" | head -1`
xdotool windowfocus $WID
sleep 1
 
# Saisie Commune : Montpellier + completion
xdotool key "shift+alt+1"
xdotool type --delay 100 "montpell"
sleep 1
xdotool key "Return"
 
# Saisie Lieu dit
xdotool key "Tab"
xdotool type --delay 100 "Jardin des plantes " $obsid
 
# Saisie Station
xdotool key "Tab"
xdotool type --delay 100 "Bord de la mare"
 
# Saisie Milieu
xdotool key "Tab"
xdotool type --delay 100 "Pelouse"
 
# Saisie Date
xdotool key "Tab"
xdotool type --delay 100 "10/10/2009"
 
# Saisie Espece : Acer monspessulanum
xdotool key "Tab"
xdotool type --delay 100 "Acer monspes"
sleep 1
xdotool key "Return"
 
# Saisie note
xdotool key "Tab"
xdotool type --delay 100 "Test"
 
# Validation
 
xdotool key "Tab"
xdotool key "Return"
 
 
# Controle insertion
 
xdotool windowfocus $CWID
sleep 1
 
/opt/lampp/bin/mysql -u root cel --execute="select * from cel_inventory where lieudit like '%$obsid%' ;"