Greetings!
We have been using your suggestion and it has been working fine. However, we ran into another problem using the file upload dialog.
In our test we are trying to upload two different files into a Sharepoint 2007 document library: Documento1.docx and Documento2.docx.
For this, we created two small test-as-steps which are responsible for pressing the upload button, handling the upload dialogue
and pressing the "OK" button. The first test-as-step is configured to upload Documento1.docx and the second test-as-step is configured
to upload Documento2.docx. Both of these test-as-steps are then used in a "main test". According to your suggestion, we transformed
the two smaller test-as-steps into Nunit tests and then invoked them in the "main test".
Thus, the code in the main test is as follows:
And the code for the two test-as-steps is as follows
and
This all seems to make sense, but when we run the test we see that the same Documento1.docx is uploaded twice,
which means that it is uploaded once by the uploadFile.uploadfile() instruction and again by the uploadFile2.UploadFile2() instruction.
This is very strange, since we can see that the configured file path for the uploadFile2.UploadFile2() instruction is for Documento2.docx
and not for Documento1.docx.
- Why is this happening?
- Is there some need for a forced "cleanup" stage for the first test-as-step?
If you require any further information or code samples for this problem, please don't hesitate to tell us.
Thank you very much for your attention,
André Silva.