Automated Test Framework error

jlshaffer
Tera Contributor

I am creating a new test in Automated Test Framework and utilizing the incident template.   I fill in all the fields that are needed to complete the form and when I run the test I receive an error:   FAILURE: Unable to set field 'subcategory' to value 'laptop'. Value 'laptop' is not currently a valid choice.   All of our subcategories are there, so I am not sure why it is stating it is not a valid choice.   Any suggestions on this?

1 ACCEPTED SOLUTION

Masha
Kilo Guru

I believe the issue here is in timing. When your Category loads it takes system some time to load the values for the Subcategory (even outside of the ATF), so when ATF tries to set the Subcategory it is actually still empty, thus the error.


I was able to get around this issue (with basic Category/Subcategory set up) by splitting out the Set Value process into 2 steps: Set Category in step1 and Subcategory in step2.



Hope this helps.


View solution in original post

5 REPLIES 5

Masha
Kilo Guru

I believe the issue here is in timing. When your Category loads it takes system some time to load the values for the Subcategory (even outside of the ATF), so when ATF tries to set the Subcategory it is actually still empty, thus the error.


I was able to get around this issue (with basic Category/Subcategory set up) by splitting out the Set Value process into 2 steps: Set Category in step1 and Subcategory in step2.



Hope this helps.


jlshaffer
Tera Contributor

Thanks.   I will try that this morning.


tufa4311
Mega Contributor

Thank you! I was running into the same problem - it seems the automation goes TOO fast at time - sometimes so fast that if "field B" is dependent on "field A" even if field A is populated by the auto process currently Field B may not have enough time to have the data available to be chosen by the automation. I split the fileds getting populated into two steps and that solved it.


I am glad I could help.