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?
- Klara asked 3 months ago
- You must login to post comments
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.
- Emb answered 3 months ago
- You must login to post comments
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!
- Klara answered 3 months ago
- You must login to post comments
Please login first to submit.