Scenario: There are List of Messages with checkbox next to it! I am trying to delete a message with specific subject by ticking on the checkbox and click 'delete' button.
Note: There are many checkboxes with the same name but different id!
I have managed to get the value and store it in the variable named 'ref'. Check the following code, it shows no error but it doesn't actually delete it
Scenario: There are List of Messages with checkbox next to it! I am trying to delete a message with specific subject by ticking on the checkbox and click 'delete' button.
checkbox:
<input type="checkbox" name="msgId" id="msgid6054" value="6054" onClick="javascript:hilightRowById_New(this);">
delete button:
<a href="javascript:validate('delete','/web_com/Delete_Message?&pageSource=workspace')
The question is how do i tick this checkbox?
Note: There are many checkboxes with the same name but different id!
I have managed to get the value and store it in the variable named 'ref'. Check the following code, it shows no error but it doesn't actually delete it
WebForm wf = response.getFormWithName("web_com_0100");
WebForm.Scriptable wfs = wf.getScriptableObject();
wfs.setParameterValue("msgId", ref);
wfs.setParameterValue("btnAction","delete");
wfs.setAction("/web_com/Delete_Message?&pageSource=workspace");
wfs.submit();