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

extract text from textbox using cell##Gridviewcell

1 Answer 80 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 03 Aug 2016, 01:55 PM
I am trying to create a loop in Telerik Test Studio that will extract text from a textbox using cell##gridviewcell. So that I can iterate through all 18 grid rows * 25 pages and save them all at once. I am going to use the extracted data to verify the same rows after deleting and reconstructing them. Below is a coded effort that I tried to achieve itteration in C#.

string[] conceptName = new String[522];
for(int i=0; i<29; i++)
{
for(int j=0; j<18; j++)
    {int k = i+j;string extractCell = "Pages.NameOFWEBSITE.ConceptBank0.SilverlightApp.Cell"+j+"1Gridviewcell.Text";SetExtractedValue("Row",extractCell);Console.WriteLine("{0}", conceptName[k]);
    }
}

Ideally, if I could find the code behind the step in telerik: gridviewcell Extract text into DataBindVariable $(Cell01Gridviewcell) It would give me the text as a string that I could then save to later use in verification.
I have done quite a bit of searching, the two leads I have found include:
these may hold the answer but i was unable to figure it out.http://docs.telerik.com/teststudio/advanced-topics/coded-samples/general/extracted-variables-in-codehttps://telerikhelper.net/category/test-studio/
telerik version 2014.4.1411.0

1 Answer, 1 is accepted

Sort by
0
Nikolay Petrov
Telerik team
answered on 08 Aug 2016, 11:26 AM
Hello Robert,

If I got your goal right - you need to go over a Silverlight grid with paging. To do so try to follow the example described in the documentation, please.

To get/set extracted variables in code use indexing like this:
SetExtractedValue("Row" + k, extractCell);
I hope these directions are helpful.

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