Function output parameters error

Answered
0
0

I have function that searches name and last name on web page and save values with Save Variable Selenium Step into output parameters: “outputName” and “ouputLastName”.

It was working ok until I realised that web page has some exceptions so I added some IF conditions. In true branch it saves values to variables and in false branch it sets value to those ouput parameters to “not found”. But now i get error: “The given key ‘outputName’ was not present in the dictionary.”
Did anybody have something similar happen and how did you solve it?

  • You must to post comments
Best Answer
0
0

Hi,

consider creating a new template variable and store the value in the branch, and then assign the output parameter to that temporary value outside the condition.

  • You must to post comments
0
0

Hi, I did as you suggested: placed new variable “outputNameTemp” and “ouputLastNameTemp” inside branch and then stored value of that variable to ouput variable “outputName” and “ouputLastName” after branch.

Thanks!

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.