While adding user information in a website I'm recording the steps. After I added a patient the web site will auto generate a unique number and by taking that unique number I have to search in the next screen.

So how do I copy that unique auto generated number and pass it to another page and search the user information.

I am using record and playback feature of MTM2012 for automating this functionality.

So when I record the steps while filling out the patient's information the website generates a unique value after patient is added. I need to copy that unique value and navigate to another page in the web site and paste it in a search box and search.

How do I always copy that unique value and paste in the next page to search patient's record.

@Dhiman the unique value is just displated on the UI and i need to cpy it from there and paste it on the different page and search

  • Just for the sake of confirmation you are using Record and playback feature of VSTS 2013 for automating this functionality, Right?
    – Dhiman
    Commented Oct 16, 2015 at 20:59
  • Or you are automating your manual test steps using MTM runtime recording feature provided during execution of manual tests?
    – Dhiman
    Commented Oct 16, 2015 at 20:59
  • After your clarification as provided below as answer by you, I need some more information before I can try to make an answer. Where that unique value is getting created and stored? Means either that unique value is getting generated in background and being saved in database OR, that unique value is displayed on the UI in some field and you need to copy it from there?
    – Dhiman
    Commented Oct 19, 2015 at 14:14

1 Answer 1


As far as I know (and I used MTM) about MTM, it seems not feasible with the record and playback feature of MTM. This is just a simple recorder which has been designed and provided to help manual tester to ease and accelerate their job of manual testing. All validations (Pass/Fail) still needs to done manually by the tester.

If you want to go further in testing using MS products, then you need to enter the rabbit hole and start using Coded UI, your first level of analysis of MTM can be helpful in creating and using Coded UI tests, as you can convert your recorded MTM test cases into Coded UI code and then can manipulate them for any level of testing (like Copy and retain a generated value and passing it to another page -- which is your required functionality). So, you nee

In addition to support above mentioned text I found this:

The record and playback in Microsoft Test Manager is designed to assist the manual tester, it is not a complete automation solution. It helps to make retesting easier and more precise. All validation is done manually in Test Manager, in saying that - Test Manager records when you input Parameters so this means that it is easier to convert these recordings to a Coded UI Test. This enables programmatic validations and you can do more complex scenarios as well.

So Microsoft Test Manager is focused around helping the manual testers

Coded UI tests are performed in Visual Studio and can be created from a recording in Test Manager and is intended for a specialist type role, normally you would want a bit of programming knowledge. bit it would still be possible to create basic tests with simple validations using the recording tool in visual studio

Thus, you will need to start using Coded UI, for achieving these kinds of mentioned scenarios.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.