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

Changing URLs fail tests

1 Answer 86 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 23 Jan 2012, 05:34 AM
Hello,

I have some Web UI tests set up where there is a list of links in a Telerik MVC grid all with the same name 'Edit', that point to different URLs. 

The test must always click the top 'Edit' link, but it will fail because the top 'Edit' link URL is always changing.

How would I set it up so that It will always click the top link in a grid? 

Cheers, 

1 Answer, 1 is accepted

Sort by
0
Stoich
Telerik team
answered on 23 Jan 2012, 12:16 PM
Hi Matt,
you state that the test fails when the URL for the "Edit" link changes.

What's likely happening is that the Find Logic for the element (the "Edit" link) is based upon the URL found in the href attribute of said element. When this URL changes the element can no longer be located.

If this is the case the easiest solution would be to change the Find Logic for the element as seen here:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/elements-pane-overview/change-how-an-element-is-found.aspx

If you require additional assistance with this, then please go ahead and provide some more details:
http://tv.telerik.com/watch/automated-testing-tools/test-studio-submitting-support-ticket-for-playback-issues

Greetings,
Stoich
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Matt
Top achievements
Rank 1
Answers by
Stoich
Telerik team
Share this question
or