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

data binding on verifying text contain

6 Answers 207 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Arbind
Top achievements
Rank 1
Arbind asked on 22 May 2014, 02:10 PM
step1 done with my all step
one of my test I have a language drop down so I put data bind things.
in first cycle it select a value from drop down and I put verify a word from that page.
that is done.one 2nd cycle it select a value from dropdown and language of the page change.so I want to verify same word with different language.so I put data driven things for same word.but its not verifying showing Unable to locate element. Details: Attempting to find [Html] element using

6 Answers, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 27 May 2014, 08:24 AM
Hello Arbind,

Thank you for contacting us.

The test fails most probably because Test Studio uses TextContent in the find expression of the drop down item. This TextContent differs in the different languages.

To resolve this you should also data bind it in the find expression.

Please check out this article which describes it details.

Let me know if this helps.

Regards,
Boyan Boev
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Herbster
Top achievements
Rank 1
answered on 03 May 2017, 03:43 PM

Boyan,

I believe that I am attempting to do the same thing. I have a drop-down field that contains the 50 US States. I'm trying to verify the values of the dropdown against a data binded excel sheet. Is it possible to achieve this without code?

0
Elena
Telerik team
answered on 08 May 2017, 09:39 AM
Hi Herbie,

Thanks for contacting us. 

As per the provided details I suspect you do not need to use code to data bind the drop down and the required verifications. However I would like to know if you have reviewed how to data bind the find logic of an element and if that was helpful to find the best approach for your scenario. 

If you still encounter difficulties please specify your actions so far and the results you got. What are your expectations and what fails in your test? 

Thanks in advance for your cooperation! 

Regards,
Elena Tsvetkova
Telerik by Progress
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Herbster
Top achievements
Rank 1
answered on 15 May 2017, 03:44 PM

Hello Elena,

My application contains a drop that has all 50 states abbreviated. I want to compare the values in that drop down to an Excel file that consist of all 50 states abbreviated and listed in a single column. Am I able to create a test up until the point of selecting the dropdown element, then have the test compare the list to the values in the Excel file?
So far, I've attempted to select the step of the drop down and data bind that step to the Excel sheet. I've also attempted to data bind the find logic of that element (described in the link you provided).

My expectation is that, if I data bind my drop down to the values of an Excel sheet to verify the states, if I were to (for example) delete or rename a state within the Excel sheet, then the test would fail when trying to compare the two. Is this correct?

I am trying to do something similar to the YouTube video titled "Taking Data Driven Web Testing for A Spin with Test Studio." The only difference is that I want to iterate though a single column of state abbreviations.

Thanks for you help, Elena!

 

 
0
Herbster
Top achievements
Rank 1
answered on 15 May 2017, 05:45 PM

Elena,

I just figured it out. I did not realize that (in my case) the specific step that is selecting the element to be validated, needs to be a Test As Step. After doing this, I was then able to bind that individual step within that test to my Excel file.

Thank you for your help

0
Elena
Telerik team
answered on 18 May 2017, 08:46 AM
Hi Herbie,

Thanks for getting back to me. I am glad to hear you manage to find a solution. 

Do not hesitate to contact me in case of further need! 

Regards,
Elena Tsvetkova
Telerik by Progress
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Arbind
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
Herbster
Top achievements
Rank 1
Elena
Telerik team
Share this question
or