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

Ranorex Spy, Recorder, and Studio.
Posts: 30
Joined: Wed May 22, 2019 5:48 am

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

Post by Priyanshu » Thu Sep 26, 2019 7:30 am

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)
Text txtItemsList = txtInfo.CreateAdapter<Ranorex.Text>(false);
Report.Info("Less text");
clk.PerformTextPresskeys(txtItemsList, makroData);
Button btnItemsList = btnInfo.CreateAdapter<Ranorex.Button>(false);
Report.Info(txtInfo + RanorexResource.SPACE + RanorexResource.added);
Report.Error(txtInfo + RanorexResource.SPACE + RanorexResource.detailsNotAdded);


JSON file data:

"Mikro": "\nTest Makro data added.\nTest Makro data added.\n",
(614.48 KiB) Downloaded 18 times

User avatar
Ranorex Guru
Ranorex Guru
Posts: 6548
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

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

Post by odklizec » Thu Sep 26, 2019 8:06 am


Have you tried to send "End" shortcut to the edit field, before entering next text?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration