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

data binding RadComboBox?

7 Answers 122 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Neeraj
Top achievements
Rank 1
Neeraj asked on 06 Oct 2010, 08:32 PM

I was testing focusing on data binding and modularization.
 
I was running into one particular issue with regards to Telerik radcombo boxes specifically when the drop down has more than three columns within the radcombo box. Eg: Customer Name which is a radcombobox has four columns - Name, Address, City and Phone when we drop down our combo box. How would I data bind a radcombo box in this instance? There are two things I want to accomplish:
 
1)       One is to check if the data is loaded from the server eg: John Dugard is loaded in the list
2)       Selecting the appropriate customer in this case - John Dugard
 
When I recorded the above two steps specifically to John Dugard everything works well, when I data bind it to my spreadsheet the test is failing. The reason being - it is looking for the specific html element rather than the exact data value. How can I get around this? 

7 Answers, 1 is accepted

Sort by
0
Nikolai
Telerik team
answered on 07 Oct 2010, 07:35 AM
Hello Neeraj,

Currently the RadComboBox translator does not allow verifications against multiple columns. You can achieve this by writing you own code. In order to that follow these steps:
1. Create a test
2. Bind the test to a Data Object that has 3 columns you will need them for the verification
3. The test is compose of 4 steps:

  • Navigate to the page with the RadComboBox
  • Open the RadCombo box 
  • Set a wait step here. This is very important for combo box with "lazy" loading.
  • Add coded step like this:
[CodedStep(@"RadComboBoxItem Verifications")]
public void WebAiiTest1_CodedStep()
{
    var item = Pages.ASPNETComboBoxDemo.RadComboBoxProductDiv.Items.Where((x) => x.Text == Data[0].ToString()).FirstOrDefault();
     
    var table = item.ChildNodes[0].As<HtmlTable>();
    var row = table.Rows[0];
 
    Assert.AreEqual(Data[0].ToString(), row.Cells[0].TextContent);
    Assert.AreEqual(Data[1].ToString(), row.Cells[1].TextContent);
    Assert.AreEqual(Data[2].ToString(), row.Cells[2].TextContent);
}

The above code is based on the current Html structure of the RadComboBox, you may need to alter it to match you version and columns.

Hope this helps.

All the best,
Nikolai
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Neeraj
Top achievements
Rank 1
answered on 01 Nov 2010, 03:22 PM
Thanks for that note.

I have a different scenario where in I databind a radcombo box with the data. Eg: I recorded the script with the text 0100.10001 and databound this column to the spreadsheet to a different number 0100.95005 (which is present in the radcombo box). Please note this is also a multi column radcombo box. But in real time if I enter the number 0100.95005 in the radcombo box and if it is present in the bound html to this radcombobox, after hitting tab it will automatically pick this value in the application. But in the above scenario - in WebUI QA Studio when I run the script it always picks the first radcombo box item not the value that is in the spreadsheet. The WebUI QA Studio appears to put in the correct value but after 'tab' simulation it picks the first item in the radcombo box



What am I doing wrong here?


0
Helen
Telerik team
answered on 04 Nov 2010, 06:15 PM
Hello Neeraj,

Could you please send us a live url or a test page containing your RadComboBox declaration to examine it locally?
Also will be helpful if you send us the exact steps of your test to reproduce the problem locally.

Regards,
Helen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Neeraj
Top achievements
Rank 1
answered on 09 Dec 2010, 08:50 PM
Can we setup a livemeeting and go through this scenario?

0
Stoich
Telerik team
answered on 13 Dec 2010, 02:40 PM
Hi Neeraj,
   Let me know what time zone you are in and your availability and I'll setup the meeting. I'm in Sofia, Bulgaria which is Central Time (GMT -2).

Just pick a time and I'll schedule the meeting and send you a meeting request.

Hope to hear from you soon!

All the best,
Stoich
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Neeraj
Top achievements
Rank 1
answered on 13 Dec 2010, 05:22 PM
Hello - I am on Eastern Time Zone.

Monday - December 13th 2010 - 2:00 -2:30 PM EST
Monday December 13th 2010 - 4:00 - 4:30 PM EST
Tuesday December 14th 2010 - 2:00 - 2:30 PM EST
Tuesday December 14th 2010 - 2:30 - 3:00 PM EST
Tuesday December 14th 2010 - 3:00 - 3:30 PM EST
Tuesday December 14th 2010 - 4:00 - 4:30 PM EST

Please let me know which time works for you.
0
Stoich
Telerik team
answered on 13 Dec 2010, 08:51 PM
Hello Neeraj,
  Tuesday December 14th 2010 - 2:00 - 2:30 PM EST works for me. I'll send you the Meeting Request via e-mail.

Hope to hear from you soon!

All the best,
Stoich
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
Tags
General Discussions
Asked by
Neeraj
Top achievements
Rank 1
Answers by
Nikolai
Telerik team
Neeraj
Top achievements
Rank 1
Helen
Telerik team
Stoich
Telerik team
Share this question
or