Page 1 of 1

Text gets entered in between in the text field using JSON file

Posted: Thu Sep 26, 2019 7:30 am
by Priyanshu
Hi team,

I am facing one issue , when I am trying to put text in the text field through JSON, text gets entered but again when I am entering the text instead of last point of the current text , JSON text gets entered in between . Could you please suggest the solution ? Attached the snapshot of the field.

Below is the code
public void EnterMakro(RepoItemInfo txtInfo,RepoItemInfo btnInfo, string makroData)
{
if(txtInfo.Exists(ConstantsFile.DelayStandard))
{
Text txtItemsList = txtInfo.CreateAdapter<Ranorex.Text>(false);
if(txtItemsList.TextValue.Length>0)
{
Report.Info("Less text");
}
clk.PerformTextPresskeys(txtItemsList, makroData);
Button btnItemsList = btnInfo.CreateAdapter<Ranorex.Button>(false);
btnItemsList.Click();
Report.Info(txtInfo + RanorexResource.SPACE + RanorexResource.added);
}
else{
Report.Error(txtInfo + RanorexResource.SPACE + RanorexResource.detailsNotAdded);
}
}

rplyWindObj.EnterMikro(rplyWinRepo.Svarsregistrering.PnlRight.UtlatandeEditorInfo,rplyWinRepo.Svarsregistrering.MikroInfo,JSONActionFile.testData.Mikro);

JSON file data:

"Mikro": "\nTest Makro data added.\nTest Makro data added.\n",

Re: Text gets entered in between in the text field using JSON file

Posted: Thu Sep 26, 2019 8:06 am
by odklizec
Hi,

Have you tried to send "End" shortcut to the edit field, before entering next text?