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

How do I test a Delete link

5 Answers 46 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Wade
Top achievements
Rank 1
Wade asked on 06 Dec 2014, 02:28 AM
I have a link that when clicked deletes an address. I'm not sure how to get the test to work for this.

Please see the attached file

Here is the DOM: <a href="http://xxxx.xxxx.com/site/account/addresses.jsp?addressUsage=SHIP_TO&amp;_DARGS=/np/site/account/addresses.jsp.1_A&amp;_DAV=61dba2ef-43c7-480f-aefd-f0097eea86ce&amp;_dynSessConf=7286385053344787325">Delete</a>

Here is the test log:

Overall Result: Fail
------------------------------------------------------------
'12/5/2014 6:13:37 PM' - Executing test: 'Address Management', path: 'Address Management.tstest.'
'12/5/2014 6:13:37 PM' - Using .Net Runtime version: '4.0.30319.18444' for test execution. Build version is '2014.3.903.0'.
'12/5/2014 6:13:37 PM' - Starting execution....
------------------------------------------------------------
------------------------------------------------------------
'12/5/2014 6:13:39 PM' - Using 'InternetExplorer' version '11.0' as default browser.
'12/5/2014 6:13:45 PM' - 'Pass' : 1. Navigate to : 'http://xxxx.xxxx.com/'
'12/5/2014 6:13:45 PM' - 'Pass' : 2. Click 'SignInLink'
'12/5/2014 6:13:47 PM' - 'Pass' : 3. Click 'LoginEmail'
'12/5/2014 6:13:47 PM' - 'Pass' : 4. Enter text 'teststudio@pens.com' in 'LoginEmail'
'12/5/2014 6:13:47 PM' - 'Pass' : 5. Enter text '000000' in 'PasswordPassword'
'12/5/2014 6:13:48 PM' - 'Pass' : 6. Click 'AtgUserprofilingProfileFormHandlerLoginImage'
'12/5/2014 6:13:49 PM' - 'Pass' : 7. Click 'AddNewLink'
'12/5/2014 6:13:51 PM' - 'Pass' : 8. Enter text 'Test' in 'FirstNameText'
'12/5/2014 6:13:51 PM' - 'Pass' : 9. Enter text 'studio' in 'LastNameText'
'12/5/2014 6:13:51 PM' - 'Pass' : 10. Enter text '555-555-1212' in 'PhoneNumberText'
'12/5/2014 6:13:51 PM' - 'Pass' : 11. Enter text '12345 any street' in 'Address1Text'
'12/5/2014 6:13:52 PM' - 'Pass' : 12. Enter text 'any town' in 'CityText'
'12/5/2014 6:13:52 PM' - 'Pass' : 13. Select 'ByValue' option 'CA' on 'StateSelect'
'12/5/2014 6:13:52 PM' - 'Pass' : 14. Enter text '92064' in 'PostalCodeText'
'12/5/2014 6:13:52 PM' - 'Pass' : 15. Click 'AddSubmitButton'
'12/5/2014 6:14:06 PM' - 'Pass' : 16. Click 'ChooseBtnsubmitButton'
'12/5/2014 6:14:07 PM' - 'Pass' : 17. Click 'Submit'
'12/5/2014 6:14:07 PM' - 'Pass' : 18. Enter text 'test' in 'FirstNameText'
'12/5/2014 6:14:08 PM' - 'Pass' : 19. Enter text 'studio' in 'LastNameText'
'12/5/2014 6:14:08 PM' - 'Pass' : 20. Enter text '555-555-1212' in 'PhoneNumberText'
'12/5/2014 6:14:08 PM' - 'Pass' : 21. Click 'Div'
'12/5/2014 6:14:08 PM' - 'Pass' : 22. Enter text '12345 any street' in 'Address1Text'
'12/5/2014 6:14:08 PM' - 'Pass' : 23. Enter text 'any town' in 'CityText'
'12/5/2014 6:14:08 PM' - 'Pass' : 24. Select 'ByValue' option 'CA' on 'StateSelect'
'12/5/2014 6:14:08 PM' - 'Pass' : 25. Enter text '92064' in 'PostalCodeText'
'12/5/2014 6:14:08 PM' - 'Pass' : 26. Click 'AddSubmitButton'
'12/5/2014 6:14:19 PM' - 'Pass' : 27. Click 'ChooseBtnsubmitButton'
'12/5/2014 6:14:50 PM' - 'Fail' : 28. Click 'DeleteLink'
------------------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
Unable to locate element. Details: Attempting to find [Html] element using
Find logic
 (Html): [href 'Exact' http://xxxx.xxxx.com/site/account/addresses.jsp?addressUsage=SHIP_TO&amp;_DARGS=/np/site/account/addresses.jsp.1_A&amp;_DAV=0815b88c-1855-4e4e-9180-c21d47fc4550&amp;_dynSessConf=95305284283785042] AND [tagname 'Exact' a]

Unable to locate element. Search failed!

Learn more about finding elements here:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/troubleshooting_guide/test-execution-problems/unable-to-locate-element.aspx
------------------------------------------------------------
'12/5/2014 6:14:50 PM' - Detected a failure. Step is marked 'ContinueOnFailure=True' continuing test execution.
'12/5/2014 6:14:50 PM' - 'Pass' : 29. Click 'DeleteLink'
'12/5/2014 6:14:50 PM' - 'Pass' : 30. Click 'NotTestLink'
'12/5/2014 6:14:53 PM' - 'Pass' : 31. Click 'Span'
------------------------------------------------------------
'12/5/2014 6:14:53 PM' - Overall Result: Fail
'12/5/2014 6:14:53 PM' - Duration: [1 min: 13 sec: 773 msec]
------------------------------------------------------------
'12/5/2014 6:14:53 PM' - Test completed!

Thanks,

Wade

5 Answers, 1 is accepted

Sort by
0
Wade
Top achievements
Rank 1
answered on 08 Dec 2014, 04:20 PM
bumping
0
Ivaylo
Telerik team
answered on 10 Dec 2014, 11:43 AM
Hello Wade,

Most probably this step is failing because of the default find logic that uses href in which there is a dynamic value. You can try editing the find logic of the element in order to use TextContent or InnerText.

Please check this article on how to change how an element is found.

Here is a short video (no audio) on how you can proceed in your case.

Regards,
Ivaylo
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Wade
Top achievements
Rank 1
answered on 10 Dec 2014, 06:18 PM
Thanks for the help.  I'll check it out.

Wade
0
Wade
Top achievements
Rank 1
answered on 10 Dec 2014, 06:19 PM
Oh, cool. Thanks for the help.  I'll check it out.

Wade
0
Ivaylo
Telerik team
answered on 11 Dec 2014, 02:06 PM
Hello Wade,

You are most welcome. Hope this will work for you.

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