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

Handle Custom Grids/ Perform actions like (Add/Edit/Delete/Search) by selecting element in Grid

7 Answers 71 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
N1t1nA
Top achievements
Rank 1
N1t1nA asked on 12 May 2011, 06:27 AM

Hello

In my application Custom Grids (Not Related to AJAX and RAD) are there, see attached snapshot <<custom grids.png>>.

I want to perform following actions like Search.

1. Example if I search like 200 and I want to Select 610200 or may be any other number 583200 in the grid, these values may vary Change there position at Runtime.
2. How do I find '610200' if exists in Grid List and Select that Result. 
3. After successfully find the Element and select i want to perform further actions on it like Edit/Delete data from grid.
  

Here is Code which appears in Pages.g.cs file when i Select the 610200 and Add to Project elements.

public ArtOfTest.WebAii.Controls.HtmlControls.HtmlSpan ContentplaceholderGridViewAccountsCodeGridLabelSpan 
{
    get
        {
return Get<ArtOfTest.WebAii.Controls.HtmlControls.HtmlSpan>id=ctl00_Contentplaceholder_GridViewAccounts_ctl07_CodeGridLabel", "tagname=span");
         }
 }

Kindly help to resolve these kind of issues.

7 Answers, 1 is accepted

Sort by
0
Stoich
Telerik team
answered on 17 May 2011, 11:35 AM
Hello Nitin,
   check out this KB article:
http://www.telerik.com/automated-testing-tools/support/kb/going-through-each-cell-in-dynamically-generated-grid.aspx
It details how you can go through all the cells in a grid. In the article the only thing we do is print each cell's TextContent:
Log.WriteLine("Cell found. TextContent:"+c.TextContent);
However, you can check whether you've found the cell you want and then break the look like this:

foreach(HtmlTableCell c in r.Cells) {

if(c.TextContent.equals("some content I'm looking for") {
HtmlTableCell myCell=c;
break;
}

}

Greetings,
Stoich
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
N1t1nA
Top achievements
Rank 1
answered on 27 Jun 2011, 10:20 AM
Hello Stoich

In my application,  ASP .NET Grid control used, Grid is created through Code, When I click on Particulat row It is recognized as TableCell or LabelSpan.

My Requirement is to make Data Driven Tests and Select particular result in by matching the contents from Excel File.
 
For example in My Application there are many account numbers binded via TableCell or appeard as grid.
160001
170001
180001

I need to Select Two accounts one by one by matching the Contents from Excel file,
Excel contains:-
160001
180001

Kindly Help?
0
Stoich
Telerik team
answered on 30 Jun 2011, 01:17 PM
Hello Nitin,
        as a paying customer you're entitled to GoToMeetings. I'd like to guide you through this automation task directly on your machine via screensharing. I feel this would be the best options since it's going to be hard to get the specifics right without looking at the DOM hierarchy of your app. Please go ahead and suggest a time I'll schedule a meeting.

All the best,
Stoich
the Telerik team
Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

Have you looked at the new Online User Guide for Telerik Test Studio?
0
N1t1nA
Top achievements
Rank 1
answered on 18 Jul 2011, 08:03 AM
Hi Stoich
As you know we are facing problems with our Grid Controls(Custom Grids)

Unable to Select the Data from Gridview as it is recognized as cell

We need a Live Meeting so that we can share directly our application with you

I would suggest 19th July 2011 3:00 PM IST for that, If you are comfortable, please share a GoToMeetings URL with me.

Thanks
Nitin
0
Cody
Telerik team
answered on 18 Jul 2011, 03:18 PM
Hi Nitin,

Stoich is out on this week. I will take over in his absence. I am located in Austin, Texas, USA. I'm afraid the only reasonable time I can meet you (due to the time difference between us and my availability) is your 8pm (my 9:30am) on the 19th. I will send you a meeting invite assuming that can work for you.

Best wishes,
Cody
the Telerik team
Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

Have you looked at the new Online User Guide for Telerik Test Studio?
0
Cody
Telerik team
answered on 20 Jul 2011, 05:29 PM
Hi Nitin,

Just to document the results of our GoToMeeting today:

1) I showed you how to find content in a table and click on it via a coded step
2) I showed you how to correctly use a dialog handler in a coded step

Greetings,
Cody
the Telerik team
Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

Have you looked at the new Online User Guide for Telerik Test Studio?
0
N1t1nA
Top achievements
Rank 1
answered on 20 Jul 2011, 05:49 PM
Thankyou Cody for Solving the Issues.
Tags
General Discussions
Asked by
N1t1nA
Top achievements
Rank 1
Answers by
Stoich
Telerik team
N1t1nA
Top achievements
Rank 1
Cody
Telerik team
Share this question
or