This is a migrated thread and some comments may be shown as answers.

Databinding and Dynamic navigation

2 Answers 82 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kim
Top achievements
Rank 1
Kim asked on 29 Oct 2015, 05:10 AM

Hello,

 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. http://domain.com/user={username} and repeat the test with different inputs

So first go will be

Step 1. http://domain.com/user=kim

Step 2. Enter FirstName Kim

Step 3. LastName Yahun

Step 4 .Click submit

then

http://domain.com/user=clara

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 Answers, 1 is accepted

Sort by
0
Kim
Top achievements
Rank 1
answered on 29 Oct 2015, 06:13 AM

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

http://domain.com/users/index.html#/user= - DataDriven: [$(user)]

 ​

0
Cody
Telerik team
answered on 30 Oct 2015, 02:33 PM
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. http://domain.com/user=kim. 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 "http://domain.com/user=" 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.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Kim
Top achievements
Rank 1
Answers by
Kim
Top achievements
Rank 1
Cody
Telerik team
Share this question
or