Hello All. I am trying to double click on alphanumeric text in a table in desktop application using DoubleClickOCRText activity. But it fails and gives following error in the log.Object reference not set to an instance of an object


System.NullReferenceException: Object reference not set to an instance of an object.
at UiPath.Workflow.Designer.Extensions.ActivityBuilderExtension.<>c__DisplayClass63_0.b__0(ModelItem x)
at System.Linq.Enumerable.WhereListIterator1.MoveNext() at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source)
at UiPath.Workflow.Designer.Extensions.ActivityBuilderExtension.FocusActivity(String activityId)
at UiPath.Workflow.Designer.DesignerAddIn.FocusActivity(String activityId)
at UiPath.Workflow.ViewModels.MainViewModel.Workflow_InvokeCompleted(Object sender, InvokeCompletedArgs e)


Looks like variable is null .
Use writeText/message box to check whether variable holds any data before passing to Double Click OCR Text activity.


Hello. Thanks for your reply. I am reading values from a csv file and using DobleClickOCRText activity clicking on that particular cell containing the value. It used to work before when I created the tests. But now it has stopped working. The values which I am trying to double click are in following format “353323081078833”, “EADEF12345AB”.


Did any changes happened after test run?
Did you try to debug /used writetext to see the value of the variable.


I did not change anything in the test. The only thing I did was I moved my test files from my machine to a central remote machine. and tried to run it there. But it doesnt work. Here I am trying to double click on a text in table of tlerik control in desktop application.


yep.when you move the file some of the factor might change but from the error it’s clear that value is empty.
Did you try to debug /used writetext to see the value of the variable.?


Yes I used writetext, it prints value. One thing which I observed with DoubleClickOCRText activity is when I am trying to find texts which have many digits similar, it gets timedout. Is there any way to get rid of this?


ok . This is kind of known issue.
But this happens when activity unable to detect the text on the target application (in case of website ,element might not be loaded yet) .As it’s ocr make sure target application in foreground.
Not sure this makes any difference but try to tweak WaitForReady property(none or complete).

If element are all most similar its tough to differentiate but in case similar you set number of occurrence field.

If you want to proceed to next transaction /get rid of error you can set ContinueOnError to True.


Thanks. I tried number of occurance, but still it is not able to find if there are multiple fields having some characters similar. Tried keeping only one row and it worked well. But when there are more rows in table, it fails.