mercredi 1 juin 2016

nightwatch edit the textbox and refill it

i am getting edit functionality check in nightwatch. empty the pre filled textbox and then edit that how to do this any idea.

my code looks like

editPatient_inputs:function(browser,editpatientval) { var editpatientid = editpatientval.setvaluesonelement.patientId; console.log(editpatientid); browser .waitForElementVisible(editpatientval.waitforelementvisible.previousbutton,8000) .click("a[data-patientid="+'"'+ editpatientval.patientsid.patientid +'"'+"]") .waitForElementVisible("form[id="+'"'+editpatientval.waitforelementvisible.form+'"'+"]", 5000) .waitForElementVisible('input[id=patientId]', 1000) .pause(1000) .execute(function(){ //document.getElementsByName(editpatientval.setvaluesonelement.patientId).value=""; document.getElementById(editpatientid).value=""; document.getElementById(editpatientid).value="EditedId"; }) }

Aucun commentaire:

Enregistrer un commentaire