I have a scenario where i am extracting a score from screen in a variable of type double.
But sometimes, a scenario can exist when this score is not there on screen. In that case it is expected that variable should be null or empty but in my case 0 is getting assigned.
That’s the default value you are getting assigned
But from screen if you are getting null then you are getting that as a string, not as an Integer right?
So that instead of assigning the value to the Double or Integer variable you can check and throw the exception
In theory, Nullable<Double> or Nullable<Int32> type will work. For example, GetText returns numeric value if there is number and returns null if there is no data.
However, extract data table activity returns empty if there is no data and it’s necessary to convert it to null if use nullable<T>