Jan Mark P.
Top achievements
Rank 1
Jan Mark P.
asked on 20 Dec 2010, 11:06 AM
Hi,
Perhaps anyone can help me how I can verify if the value of the combo box is the same as the one I specified in Local Data.
For example, the current selected value in the combobox is "AA" (radcombobox: text 'Same' 'AA'.). Now in Local Data, I created a column called "Company" and the value for the checking of the 1st iteration would be "BB". What will I do to verify that the value selected in the combobox is equal to "BB" (one specified in Local Data) and not "AA".
Thanks!
Perhaps anyone can help me how I can verify if the value of the combo box is the same as the one I specified in Local Data.
For example, the current selected value in the combobox is "AA" (radcombobox: text 'Same' 'AA'.). Now in Local Data, I created a column called "Company" and the value for the checking of the 1st iteration would be "BB". What will I do to verify that the value selected in the combobox is equal to "BB" (one specified in Local Data) and not "AA".
Thanks!
9 Answers, 1 is accepted
0
Hi Jan Mark P.,
WebUI Test Studio works with translators developed for Telerik Silverlight and ASP.NET Controls controls.
When you highlight a Telerik control element (like a RadComboBox) you can choose between multiple pop-up menus. The first one is the normal menu which treats the element as a regular HTML element. The other menus give you enhanced testing capabilities unique to the Telerik control you are testing (see screenshot 1). In the case of a RadComboBox you have additional Verification options in QuickTasks (screenshot 2).
Start recording, open the RadComboBox and select some element (like AA). Now highlight the RadComboBox and open the second pop-up menu. From QuickTasks select "Verify text is AA" (see screenshot 3).
A Verify step will now appear in your test (see screenshot 4) Left-click on it to select it and go to its Properties Window. From there expand the (Bindings) menu. The Data Driven Editor opens. Click on Text and write the name of the column you want to use like this: $(Company) (see screenshot 5).
Now when you run your test it will check whether the value you selected from the RadComboBox is equal to the value from your Local Data for each iteration.
I've attached a very simple test that demonstrates this on a RadComboBox demo from Telerik's site - check it out.
I hope this helps - hope to hear from you soon!
Kind regards,
WebUI Test Studio works with translators developed for Telerik Silverlight and ASP.NET Controls controls.
When you highlight a Telerik control element (like a RadComboBox) you can choose between multiple pop-up menus. The first one is the normal menu which treats the element as a regular HTML element. The other menus give you enhanced testing capabilities unique to the Telerik control you are testing (see screenshot 1). In the case of a RadComboBox you have additional Verification options in QuickTasks (screenshot 2).
Start recording, open the RadComboBox and select some element (like AA). Now highlight the RadComboBox and open the second pop-up menu. From QuickTasks select "Verify text is AA" (see screenshot 3).
A Verify step will now appear in your test (see screenshot 4) Left-click on it to select it and go to its Properties Window. From there expand the (Bindings) menu. The Data Driven Editor opens. Click on Text and write the name of the column you want to use like this: $(Company) (see screenshot 5).
Now when you run your test it will check whether the value you selected from the RadComboBox is equal to the value from your Local Data for each iteration.
I've attached a very simple test that demonstrates this on a RadComboBox demo from Telerik's site - check it out.
I hope this helps - hope to hear from you soon!
Kind regards,
Stoich
the Telerik team
Interested in Agile Testing?
Check out Telerik TV for a recording of
Automated Testing in the Agile Environment
0
QA
Top achievements
Rank 1
answered on 25 Aug 2011, 07:41 PM
Hi Stoich,
I am using Test Studio 2010.3.1421.0 Dev Edition. My issue is when I data bind a value in RadComboBox that doesn't exist in the combo box, the test is randomly picking up a different value. Any idea how we can avoid this? Is this a known issue?
Thank You,
Dipti
I am using Test Studio 2010.3.1421.0 Dev Edition. My issue is when I data bind a value in RadComboBox that doesn't exist in the combo box, the test is randomly picking up a different value. Any idea how we can avoid this? Is this a known issue?
Thank You,
Dipti
0
Shashi
Top achievements
Rank 1
answered on 25 Aug 2011, 07:57 PM
Just to clarify Dipti's question: We are picking an element from the list by label rather than index (see attached image). We are doing this because we want the test to select the entry no matter where it is in the list.
We are expecting the statement to fail if the value we are passing in is not found in the list - instead we are finding that it picks some value. Value it picks is different on different machines and also seems to depend on the contents of the list. Either it is random - or (it seems more likely) the code is calculating a list index (or a hash table index?) from the label and picking the entry at that index (if it exists).
If this is by design, what is the expected behavior if the list is empty?
Shashi
We are expecting the statement to fail if the value we are passing in is not found in the list - instead we are finding that it picks some value. Value it picks is different on different machines and also seems to depend on the contents of the list. Either it is random - or (it seems more likely) the code is calculating a list index (or a hash table index?) from the label and picking the entry at that index (if it exists).
If this is by design, what is the expected behavior if the list is empty?
Shashi
0
Hi Shashi,
now I understand the issue.
I was not able to reproduce this. In my test no item was picked at all when the data-binding provided a non-existent item name.
It seems that you're using an older version of Test Studio. Go ahead and upgrade to the latest internal build of Test Studio (you can download it from your Telerik account). The latest release contains many improvements over what you're using. It's likely that upgrading will resolve your issue.
Greetings,
Stoich
the Telerik team
now I understand the issue.
I was not able to reproduce this. In my test no item was picked at all when the data-binding provided a non-existent item name.
It seems that you're using an older version of Test Studio. Go ahead and upgrade to the latest internal build of Test Studio (you can download it from your Telerik account). The latest release contains many improvements over what you're using. It's likely that upgrading will resolve your issue.
Greetings,
Stoich
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
Ha
Top achievements
Rank 1
answered on 19 Apr 2012, 03:46 AM
Hi
I am using QA test studio
I want to compare all value in combobox that is the same with data in excel file
I use data driven . But it's fail, it only compare with focus value
How can i do?
I am using QA test studio
I want to compare all value in combobox that is the same with data in excel file
I use data driven . But it's fail, it only compare with focus value
How can i do?
0
Hello Ha,
You didn't specify what kind of Combobox you are testing. Is it a Silverlight or an Html Combobox? Looking your other ticket I'm assuming it's an Html Combobox.
It's easy to select an option from the Combobox through the UI, based on the data in the Excel file, but to verify all Combobox options without selecting them first you need to use a coded step. Here is a sample coded step against this demo site:
Please check this video to see how it works and let me know if you need further assistance.
All the best,
Plamen
the Telerik team
You didn't specify what kind of Combobox you are testing. Is it a Silverlight or an Html Combobox? Looking your other ticket I'm assuming it's an Html Combobox.
It's easy to select an option from the Combobox through the UI, based on the data in the Excel file, but to verify all Combobox options without selecting them first you need to use a coded step. Here is a sample coded step against this demo site:
public
void
WebTest_CodedStep()
{
HtmlSelect combo = Pages.TryitEditorV15.FrameView.Select;
IList<HtmlOption> options = combo.Find.AllByTagName<HtmlOption>(
"option"
);
Assert.IsNotNull(options);
foreach
(HtmlOption option
in
options)
{
if
(option.Text == Data[
"Col1"
].ToString())
{
Log.WriteLine(Data[
"Col1"
].ToString() +
" exists in the Combobox"
);
}
}
}
Please check this video to see how it works and let me know if you need further assistance.
All the best,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings
0
Ha
Top achievements
Rank 1
answered on 24 Apr 2012, 12:05 PM
Thanks Plamen!
It is ok
It is ok
0
Pankaj
Top achievements
Rank 1
answered on 12 Sep 2018, 08:53 AM
Hi All,
I am trying to pick the text from a Input and a auto-complete box , but its returning me the placeholder value of that element not the provided text.
Its a WPF application and i want to pick the given value from input box and auto-complete box.
Below is my line of Code :
Public Sub checkObjecktValue()
Dim objektvalue As FrameworkElement = Manager.ActiveApplication.MainWindow.Find.ByName("EinsatzortMaskeUserControl").Find.ByName("TextBoxEinsatzortObjekt")
Dim value = objektvalue.Text()
Log.WriteLine("text value is... "+ value)
End Sub
Please see attached screenshot
Can anyone help me on this..
0
Hello Pankaj,
Have you tried to use get and set extracted variable to automate that?
I hope this will be helpful!
Regards,
Elena Tsvetkova
Progress Telerik
Have you tried to use get and set extracted variable to automate that?
I hope this will be helpful!
Regards,
Elena Tsvetkova
Progress Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings