ray_mosley
13 years agoFrequent Contributor
Text Entry Playback error - WHY?
In both the examples below, the .jpg was taken after the aqUtils.Delay statement.
The following snippet of code fails: (see attached file *_Exclamation):
Aliases.emdsTaskMan.fmMsgNewMail2.pnBottom0.Panel3.moMessage.Click(9, 18);
qa_InitProjectVariable("taskman_MsgResponseText","I got your message. LEAVE ME ALONE!");
Aliases.emdsTaskMan.fmMsgNewMail2.pnBottom0.Panel3.moMessage.Keys(qa_GetProjectVariable("taskman_MsgResponseText"));
aqUtils.Delay(1500,_msg);
When modified to be a longer string that ends in a period, it works (see the *_Period attached file):
Aliases.emdsTaskMan.fmMsgNewMail2.pnBottom0.Panel3.moMessage.Click(9, 18);
////qa_InitProjectVariable("taskman_MsgResponseText","I got your message. LEAVE ME ALONE!");
qa_InitProjectVariable("taskman_MsgResponseText","I got your message. LEAVE ME ALONE. I am on break.");
Aliases.emdsTaskMan.fmMsgNewMail2.pnBottom0.Panel3.moMessage.Keys(qa_GetProjectVariable("taskman_MsgResponseText"));
aqUtils.Delay(1500,_msg);
I cannot understand why. The project variable is used only here and where it is checked (see below):
var _ciMainFrom = Aliases.emdsTaskMan.fmMsgMessage.pnBase.Panel5.pcTaskMan.tsMessages.Panel3.rgdMessage0.GetCells(5,1).Text;
var _ciMainSub = Aliases.emdsTaskMan.fmMsgMessage.pnBase.Panel5.pcTaskMan.tsMessages.Panel3.rgdMessage0.GetCells(6,1).Text;
var _ciDetailFrom = Aliases.emdsTaskMan.fmMsgMessage.VCLObject("lbFrom").Caption;
var _ciDetailSub = Aliases.emdsTaskMan.fmMsgMessage.VCLObject("lbSubject").Caption;
var _ciResponseText = Aliases.emdsTaskMan.fmMsgMessage.pnBase.Panel5.pcTaskMan.tsMessages.Panel3.pnlMessageViewer.VCLObject("moMessage").wText;
var _ciMsgCount = Aliases.emdsTaskMan.fmMsgMessage.VCLObject("lblTotalMessages").Caption;
_pos1 = aqString.Find(_ciMainFrom,qa_GetProjectVariable("taskman_provider2_Last"),0,false);
_pos2 = aqString.Find(_ciMainFrom,qa_GetProjectVariable("taskman_provider2_First"),_pos1 + 4,false);
_pos3 = aqString.Find(_ciMainSub,qa_GetProjectVariable("taskman_MsgSubject"),0,false);
_pos4 = aqString.Find(_ciDetailSub,qa_GetProjectVariable("taskman_MsgSubject"),0,false);
_pos5 = aqString.Find(_ciResponseText,qa_GetProjectVariable("taskman_MsgResponseText"),0,false);
_pos6 = aqString.Find(_ciMsgCount,_msgCount1,0,false);
if (_pos1 < 0 || _pos2 < _pos1 || _pos3 < 0 || _pos4 < 0 || _pos5 < 0 || _pos6 < 0 )
{
errCount++;
_msg = _msg + "; ***Message not verified in Completed Items folder***";
}
The variable _pos5 is negative when the ending character is ! (entire string could not be found, thus -1) but works when it ends in a period. I added the delay and even tried escaping the exclamation.
The following snippet of code fails: (see attached file *_Exclamation):
Aliases.emdsTaskMan.fmMsgNewMail2.pnBottom0.Panel3.moMessage.Click(9, 18);
qa_InitProjectVariable("taskman_MsgResponseText","I got your message. LEAVE ME ALONE!");
Aliases.emdsTaskMan.fmMsgNewMail2.pnBottom0.Panel3.moMessage.Keys(qa_GetProjectVariable("taskman_MsgResponseText"));
aqUtils.Delay(1500,_msg);
When modified to be a longer string that ends in a period, it works (see the *_Period attached file):
Aliases.emdsTaskMan.fmMsgNewMail2.pnBottom0.Panel3.moMessage.Click(9, 18);
////qa_InitProjectVariable("taskman_MsgResponseText","I got your message. LEAVE ME ALONE!");
qa_InitProjectVariable("taskman_MsgResponseText","I got your message. LEAVE ME ALONE. I am on break.");
Aliases.emdsTaskMan.fmMsgNewMail2.pnBottom0.Panel3.moMessage.Keys(qa_GetProjectVariable("taskman_MsgResponseText"));
aqUtils.Delay(1500,_msg);
I cannot understand why. The project variable is used only here and where it is checked (see below):
var _ciMainFrom = Aliases.emdsTaskMan.fmMsgMessage.pnBase.Panel5.pcTaskMan.tsMessages.Panel3.rgdMessage0.GetCells(5,1).Text;
var _ciMainSub = Aliases.emdsTaskMan.fmMsgMessage.pnBase.Panel5.pcTaskMan.tsMessages.Panel3.rgdMessage0.GetCells(6,1).Text;
var _ciDetailFrom = Aliases.emdsTaskMan.fmMsgMessage.VCLObject("lbFrom").Caption;
var _ciDetailSub = Aliases.emdsTaskMan.fmMsgMessage.VCLObject("lbSubject").Caption;
var _ciResponseText = Aliases.emdsTaskMan.fmMsgMessage.pnBase.Panel5.pcTaskMan.tsMessages.Panel3.pnlMessageViewer.VCLObject("moMessage").wText;
var _ciMsgCount = Aliases.emdsTaskMan.fmMsgMessage.VCLObject("lblTotalMessages").Caption;
_pos1 = aqString.Find(_ciMainFrom,qa_GetProjectVariable("taskman_provider2_Last"),0,false);
_pos2 = aqString.Find(_ciMainFrom,qa_GetProjectVariable("taskman_provider2_First"),_pos1 + 4,false);
_pos3 = aqString.Find(_ciMainSub,qa_GetProjectVariable("taskman_MsgSubject"),0,false);
_pos4 = aqString.Find(_ciDetailSub,qa_GetProjectVariable("taskman_MsgSubject"),0,false);
_pos5 = aqString.Find(_ciResponseText,qa_GetProjectVariable("taskman_MsgResponseText"),0,false);
_pos6 = aqString.Find(_ciMsgCount,_msgCount1,0,false);
if (_pos1 < 0 || _pos2 < _pos1 || _pos3 < 0 || _pos4 < 0 || _pos5 < 0 || _pos6 < 0 )
{
errCount++;
_msg = _msg + "; ***Message not verified in Completed Items folder***";
}
The variable _pos5 is negative when the ending character is ! (entire string could not be found, thus -1) but works when it ends in a period. I added the delay and even tried escaping the exclamation.