Databinding and Dynamic navigation

3 posts, 0 answers
  1. Kim
    Kim avatar
    2 posts
    Member since:
    Oct 2015

    Posted 29 Oct 2015 Link to this post


     I am using a trial version of Test Studio, and its my first time with test automation so excuse me newbie questions.

     Here goes a scenario.

     I got a list of different ids that i need to navigate to and make my tests

     What i can do is

     1. Start a recorder

    2. Navigate to each URL individually and repeat


    What i want to do is navigate to a different url e.g.{username} and repeat the test with different inputs

    So first go will be

    Step 1.

    Step 2. Enter FirstName Kim

    Step 3. LastName Yahun

    Step 4 .Click submit


    then goto step 2 but enter clara and jack instead

    How do i achieve this?

    Please refer me to any videos


    Thanks and sorry for the long post

  2. Kim
    Kim avatar
    2 posts
    Member since:
    Oct 2015

    Posted 29 Oct 2015 in reply to Kim Link to this post

    okays i was able to databind at least but now i get the following error


    Url passed in has invalid format. If you are trying to use relative paths,

    I data binded to an excel file which has one column user and it contains two rows kim and clara

    the navigate url is as follows but still says invalid any ideas - DataDriven: [$(user)]


  3. Cody
    Cody avatar
    3360 posts

    Posted 30 Oct 2015 Link to this post

    Hi Kim,

    Data binding is the right approach. I can offer 2 solutions to this problem:

    1) Use 3 columns in your Excel file. The first column is the full and complete URL to navigate to e.g. The second column is just the user name. The third column is the last name. Data bind each column to the appropriate test step. The first column to your NavigateTo step, the second column to the step entering first name and the third column to the step entering the last name.

    2) Use a coded step to concatenate the first name column to the static string "" and use that for the NavigateTo, all via code. You can then use non-coded steps to enter the first name and last name the same as option 1 above.

    If you need help with the code for option 2, let me know.

    P.S. Don't worry about your "long" post (it was really very long). We prefer long posts over posts that are too short and don't give us enough information to assist the customer.

    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top