#{selenium 'Try to edit objects with simple binding'} open('@{Users.edit()}') assertValue('name', 'Guillaume') assertValue('b', 'true') assertValue('c', 'false') assertValue('i', '') assertValue('j', '0') assertValue('l', '356') assertValue('k', '') assertValue('birth', '21/12/1980') // No modification clickAndWait('go') assertText('name', 'Guillaume') assertText('b', 'true') assertText('c', 'false') assertText('i', '') assertText('j', '0') assertText('l', '356') assertText('k', '') assertText('birth', '21/12/1980') // open('@{Users.edit()}') type('b', 'false') type('c', 'true') clickAndWait('go') assertText('name', 'Guillaume') assertText('b', 'false') assertText('c', 'true') assertText('i', '') assertText('j', '0') assertText('l', '356') assertText('k', '') assertText('birth', '21/12/1980') // open('@{Users.edit()}') type('b', '') type('c', '') clickAndWait('go') assertText('name', 'Guillaume') assertText('b', '') assertText('c', 'false') assertText('i', '') assertText('j', '0') assertText('l', '356') assertText('k', '') assertText('birth', '21/12/1980') // open('@{Users.edit()}') type('b', 'x') type('c', 'x') clickAndWait('go') assertText('name', 'Guillaume') assertText('b', 'false') assertText('c', 'false') assertText('i', '') assertText('j', '0') assertText('l', '356') assertText('k', '') assertText('birth', '21/12/1980') // open('@{Users.edit()}') type('birth', '12/05/2003') clickAndWait('go') assertText('name', 'Guillaume') assertText('b', 'true') assertText('c', 'false') assertText('i', '') assertText('j', '0') assertText('l', '356') assertText('k', '') assertText('birth', '12/05/2003') // open('@{Users.edit()}') type('birth', 'nimp') clickAndWait('go') assertText('name', 'Guillaume') assertText('b', 'true') assertText('c', 'false') assertText('i', '') assertText('j', '0') assertText('l', '356') assertText('k', '') assertText('birth', '21/12/1980') assertTextPresent('u.birth: Incorrect value') // open('@{Users.edit()}') type('birth', '') clickAndWait('go') assertText('name', 'Guillaume') assertText('b', 'true') assertText('c', 'false') assertText('i', '') assertText('j', '0') assertText('l', '356') assertText('k', '') assertText('birth', '') assertTextNotPresent('u.birth: Incorrect value') // Remove the birth field open('@{Users.edit()}') getEval('window.document.getElementById("birth").name="xxx"') clickAndWait('go') assertText('name', 'Guillaume') assertText('b', 'true') assertText('c', 'false') assertText('i', '') assertText('j', '0') assertText('l', '356') assertText('k', '') assertText('birth', '21/12/1980') assertTextNotPresent('u.birth: Incorrect value') // Remove all fields ! open('@{Users.edit()}') getEval('window.document.getElementById("name").name="xxx"') getEval('window.document.getElementById("b").name="xxx"') getEval('window.document.getElementById("c").name="xxx"') getEval('window.document.getElementById("i").name="xxx"') getEval('window.document.getElementById("j").name="xxx"') getEval('window.document.getElementById("l").name="xxx"') getEval('window.document.getElementById("k").name="xxx"') getEval('window.document.getElementById("birth").name="xxx"') clickAndWait('go') assertText('name', 'Guillaume') assertText('b', 'true') assertText('c', 'false') assertText('i', '') assertText('j', '0') assertText('l', '356') assertText('k', '') assertText('birth', '21/12/1980') assertTextNotPresent('Incorrect value') #{/selenium}