nick.v
(nic)
May 4, 2020, 6:01am
1
Hi,
I am using a type into activity to type into a field on a website using chrome, however i am getting the below error not sure why.
‘Object reference not set to an instance of an object’
Variable i able using to type into is taken from google sheets as an object i have then assigned it .ToString
How can i resolve this issue?
@nick.v What value are you typing in ?
nick.v
(nic)
May 4, 2020, 6:10am
3
Hi @supermanPunch its a string value with letters and numbers
@nick.v is it hardcoded or is it in a variable ?
nick.v
(nic)
May 4, 2020, 6:12am
5
@supermanPunch its in a variable
@nick.v Check if the variable has value before Type Into using a Message Box
@nick.v ,
The Value from Google sheet seems Null,
Before Typing the Value - please Have an If Condition an verify that the variable is Not Null or Empty.
String.IsNullorEmpty(Variable) - If False , then Proceed to Typing.
–
Mukesh
2 Likes
nick.v
(nic)
May 4, 2020, 6:16am
8
@supermanPunch i have just tested this and the variable is storing the value perfectly, i still can’t work out why it isn’t typing the variable into the text field.
@nick.v Can you hardcode the value and check if it is working ?
nick.v
(nic)
May 4, 2020, 7:02am
10
@supermanPunch i don’t know how to do it hardcode sorry
@nick.v Instead of Variable, just use this “Hello” in Type Into and check if it enter Hello in the website Field.
nick.v
(nic)
May 4, 2020, 7:20am
12
@supermanPunch ok so ive just tried that and it typed ‘hello’ into the field.
@nick.v Then I guess there’s a Problem in your Variable , Check in Variables Section if there are two same name variables are defined in the Workflow
nick.v
(nic)
May 4, 2020, 7:42am
14
@supermanPunch no the same name variable doesn’t exist. i am using an Array to get the stored value from the google sheets, then assigning the array to string as i need the third value in the string am using " " to determine the spaces between the words.
@nick.v What is the Expression used in the MyArr Assignment?
nick.v
(nic)
May 4, 2020, 7:52am
16
@supermanPunch
MyArr = ColumnI.ToString.Split (" "c)
Column “i” is the column i am taking the value from in google sheets
Can you put “MyArr.COunt” in the message box and see the length of the array?
Get the Array count and check it.
if count > 0 continue the process
nick.v
(nic)
May 4, 2020, 7:57am
19
@nalaka_sajith @MuralidharVankamaddi the count came back with 9 which is fine thats how many characters are in the value i need
is it possible to share the code which is shown in the above sceenshot?