# HG changeset patch # User Nicholas Jillings # Date 1433254720 -3600 # Node ID 9f67e67471cedc1c985940c2a87c68c9e89c3bad # Parent 918d9a5943cdf390698a01443c1c7e4e958f9d03 Stash create_test. Implementing submit. Need to test on OSX diff -r 918d9a5943cd -r 9f67e67471ce test_create/test_create.html --- a/test_create/test_create.html Tue Jun 02 12:24:19 2015 +0100 +++ b/test_create/test_create.html Tue Jun 02 15:18:40 2015 +0100 @@ -48,7 +48,7 @@ var ready = validate(); if (ready == false) { var errMsg = document.getElementById('errorMessage'); - errMsg.textContent = "There were some errors with your XML. Any input boxes highlighted in red are invalid because they are empty. Please fill these in correctly. Any boxes which are yellow are not-invalid but will use the default value."; + errMsg.textContent = "There were some errors with your XML. Any input boxes highlighted in red are invalid because they are empty or because its ID matches another elements ID. Please fill these in correctly. Any boxes which are yellow are not-invalid but will use the default value."; errMsg.style.visibility = 'visible'; document.getElementById('createXML').disabled = true; @@ -60,6 +60,57 @@ } } + function buttonClickedSubmit() { + var ready = validate(); + if (ready == true) { + var xmlDoc = document.createElement('BrowserEvalProjectDocument'); + var setup = document.createElement('setup'); + setup.setAttribute('interface',document.getElementById('interface').value); + if (document.getElementById('projectReturn').value == "") { + setup.setAttribute('projectReturn',"null"); + } else { + setup.setAttribute('projectReturn',document.getElementById('projectReturn').value); + } + setup.setAttribute('randomiseOrder',document.getElementById('randomisePageOrder').checked); + setup.setAttribute('collectMetrics',document.getElementById('collectMetrics').checked); + + var globalPreTest = document.createElement('preTest'); + var options = document.getElementById('globalPreTest').getElementsByClassName('head'); + constructPrePost(globalPreTest, options); + + var globalPostTest = document.createElement('postTest'); + options = document.getElementById('globalPostTest').getElementsByClassName('head'); + constructPrePost(globalPostTest, options); + + var globalMetrics = document.createElement('metric'); + options = document.getElementById('globalMetric').getElementsByClassName('attrib')[0].getElementsByTagName('input'); + for (var i=0; iElement Tracker Element Flag Listened To - + Element Flag Moved