Forum Discussion
Check the type of the parameters in the lines that give the error. You may have a variable somewhere that's string instead of object or some other type mixup.
Thanks for your reply Marsha_R.
I couldn't find a way to resolve this issue quickly so I had to revert back to using the existing project for what I wanted to do. It was a bit of a pain but not major.
I did have a side effect issue caused by sharing the test with the other project suite which I am more concerned about. When I tried to run the test I had shared from it's parent project it would not run for the same reason. When I looked closer the Value had changed and now included odd full stops where it didn't before. For example,
aqConvert.DateTimeToFormatStr(aqDateTime.AddDays(aqDateTime.Today, 1), "%d%m%Y")
became something like
aqConvert.DateTimeToFormatStr.(aqDateTime.AddDays(aqDateTime.Today,. 1),. "%d%m%Y")
So, basically, by sharing the test with another project I had inadvertantly broken the test! To resolve I had to manually amend and take out the random full stops, thankfully I hadn't shared many.
Any idea why this happened? I would like to share tests between projects and project suites, so I would be interested to know so that I can make sure this doesn't occur.
Many thanks,
Jenny