18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
Pop-up with Div element
I am trying to set a value (text box) on a pop-up window as provided below, but the controller doesnt recognize this element while playing back:
_popup("asdasdfas")._setValue(_div("mocsEditableDiv[3]"), "01/02/2010");
Any suggestions or recommendations on whats causing this ?
Thanks,
_popup("asdasdfas")._setValue(_div("mocsEditableDiv[3]"), "01/02/2010");
Any suggestions or recommendations on whats causing this ?
Thanks,
Comments
You are setting the value of a div.
Is it how it was recorded? _setValue only works for form elements.
Can you provide more details about this mocsEditableDiv?
Is it editable because contentEditable=true?
Regards,
Narayan
I set the value manually using the controller (Set button), since it wasnt captured while recording.
And yes contentEditable=true.
Below embedded are some additional properties:
"<DIV class=mocsEditableDiv onblur="if(this.innerHTML != '') { autoFormat(this, '441063', 'DATE_ISSUEDD', 'DATE'); } else { this._curText=''; }" contentEditable=true onfocus=editableDivOnFocus(this) value _ordersInd="N" _funcActionId="2247" _seqNum="6" _parentSeqNum="" _privValue="" _parentDivId="div1280202671714" _funcActnAttribId="140283" _caseBalance="" _curText="" initHeight="15" initWidth="149" hasAttached="true"></DIV>;"
_popup("asdasdfas")._getText(_byClassName("mocsEditableDiv[1]", "DIV"));
And have tried the below, with no luck any suggestions? Which return undefined:
_popup("asdasdfas")._type(_byClassName("mocsEditableDiv[1]", "DIV"), "11/11/2011");
_popup("asdasdfas")._setValue(_byClassName("mocsEditableDiv[1]", "DIV"), "11/11/2011");