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

HTML 5 finding elements

4 Answers 12 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nithya
Top achievements
Rank 1
Veteran
Nithya asked on 23 Jun 2017, 02:01 PM

Hi, 

I have an html5 inout element... I need to find out the element and some text on it...

Can anyone help me in writing code for finding the html5 element..?

 

Regards,

Nithya A.

4 Answers, 1 is accepted

Sort by
0
Nikolay Petrov
Telerik team
answered on 26 Jun 2017, 08:49 AM
Hi Nithya,

Thank you for your question.

Please find in the available documentation articles on how to locate DOM elements in a coded step. There are certain find expressions that you might find useful as well. There are a DOM navigation samples available too. I believe you could find further more interesting samples in the product documentation and in the forums related to the topic you are interested in.

I hope this information is helpful. 

Best Regards,
Nikolay Petrov
Progress Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Nithya
Top achievements
Rank 1
Veteran
answered on 11 Jul 2017, 12:16 PM

Hi Nikolay,

Thanks for your response.. I have gone through the documentations. But still unable to solve my problem.

I have a HTML5 application - My Requirement is to write some text in the Input Text Box which is a Dropdown.

Steps Followed :

Name - (This is a Text box which has a dropdown of list of names) - I need to Search a particular name(eg:xxx) by typing in the Text box.

 

=> I Highlighted the Element (Name) by using the recorder,  and added to my Test step.

=> The Recorded element consists of id and tagindex in the find settings

"id and Tag index "

=> When I Right click - Edit in Live - It says "Unable to find out the Element"

=> I changed the find settings using
"Class  and Tagname" - I am able to find the element.

=> But when I run the step separately, it get passed. When I run it in the Test, it failed...

 

Could you please clarify the below questions

1. What are the components (eg : id, tagname, tagindex, class) should I use to find out the correct element

2. Why the step is failing when run in a test ?

 

Regards,

Nithya A.

 

 

 

 

 

 

 

0
Nikolay Petrov
Telerik team
answered on 14 Jul 2017, 08:05 AM
Hello Nithya,

Generally speaking if the element has an ID - it is always best property to use in the find logic. If the element does not have one there a two approaches here:

 - to find a set of properties that uniquely describe the element 
 - to create a chained find logic using the closes to this element that has an ID

There is an exception message that indicates the reason for the step failure that you could check in the execution log after the test completes.

I hope these pointers are useful to you.

Kind Regards,
Nikolay Petrov
Progress Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Nithya
Top achievements
Rank 1
Veteran
answered on 18 Jul 2017, 12:31 PM
Thanks for the response.. I wil check this out and get back to you , if i have any more problems
Tags
General Discussions
Asked by
Nithya
Top achievements
Rank 1
Veteran
Answers by
Nikolay Petrov
Telerik team
Nithya
Top achievements
Rank 1
Veteran
Share this question
or