I got one issue on using WebAii 2.0 for testing Silverlight.
Environment: WIn7 x86 + VS 2010 RC. Silverlgiht 3.0 was build in VS2010 too.
Test case do :
Launch browser
Find the Silverlgiht in page and find its combobox inside, then select the combobox item.
After combobox item was select, the product Silverlgith will grab new items to a listbox and filled the listbox.
All above steps work fine. And after the listbox items were filled, I can get find list box control, but from listbox control, I cannot find the listboxitem which were dynamic created!
ListBox listbox = app.FindName<ListBox>("lboxMetaDimensions");
IList
<ListBoxItem> listBoxItems = listbox.Find.AllByType<ListBoxItem>();
The listBoxItems == null.
I try to look into the all children items in all deepth levels recursively, and the result shows it does not contain listboxitem at all. Actually, when I use other Silverlight tool to inspect the v-tree, I can see the listboxitem.
Is any step I need to do after combox selection done and new item were filled in order to get new listboxitem?
Thanks.
Dim
qsb As Element = frame.Find.ById("PRSelectTextbox")
Dim
qsb2 As RadNumericTextbox = frame.Find.ById(Of RadNumericTextbox)("PRSelectTextbox")
And I can see the value inside of it is "1".
However, when I try to set the value, using either
qsb.Attributes(3).value = "2"
or
qsb2.SetValue("2")
I can see the value change in the debugger, but it never changes in the browser, and when I programmatically click the button to update the grid, the grid doesn't update because the textbox hasn't changed.
Earlier in the code I am able to successfully change the text of a HtmlInputText object, but this does not work for the radnumerictextbox.
Any idea why the page is not staying in sync with the debugger?
Hi:
I need help to choose the framework. I have two scenarios:
1. I am testing a product which can be customized based on the user. For eg the core product has 10 menus, let’s say menu1, menu2, menu3 …menu10. User1 can have menu1, menu3, menu5 and similarly user2 can have menu2, menu1, menu6, along with some common features. Menus are based on dynamic HTML IDs. When I record, the Telerik tool recognizes the menus based on their dynamic HTML IDs. So, same menu option will have different HTML IDs for different users. How do I handle this issue.
2. We are using Telerik grid control. Again this control is configurable for different users i.e., it will different columns for different users.
Please let me know how do I choose the test framework.
Regards
-Archana
| Imports ArtOfTest.WebAii.Controls.HtmlControls |
| Imports NUnit.Framework |
| Imports ArtOfTest.WebAii.ObjectModel |
| Imports ArtOfTest.WebAii.Core |
| <TestFixture()> _ |
| Public Class WebAiiTest |
| <Test()> _ |
| Public Sub TestWebAii() |
| ' Initialize the settings you want used. |
| Dim mySettings As Settings = New Settings(BrowserType.InternetExplorer, "c:\log\") |
| ' Create the manager object |
| Dim myManager As Manager = New Manager(mySettings) |
| ' Start the manager |
| myManager.Start() |
| ' Launch a new browser instance. [This will launch an IE instance given the setting above] |
| myManager.LaunchNewBrowser() |
| ' Navigate to a certain web page |
| myManager.ActiveBrowser.NavigateTo("http://www.google.com") |
| ' Perform your automation actions. |
| Dim myInput As HtmlInputText = myManager.ActiveBrowser.Find.ByName(Of HtmlInputText)("q") |
| myInput.Text = "ArtOfTest" |
| Dim mybtn As Element = myManager.ActiveBrowser.Find.ByTagIndex("input", 3) |
| myManager.ActiveBrowser.Actions.Click(mybtn) |
| ' Shut-down the manager and do all clean-up |
| myManager.Dispose() |
| End Sub |
| End Class |
| HtmlInputText dateBox = base.myManager.ActiveBrowser.Find.ById<HtmlInputText>"ctl00_ContentPlaceHolder1_DatePicker1_rdpCurrentDate_dateInput_text"); |
| dateBox.Text = "Oct 11"; |
At this point in a manual scenario, if the user hits {ENTER} or clicks out of the RadDatePicker control the control's behind-the-scenes functionality formats the date to '10/11/2009'. But I can't figure out how to automate the triggering of this formatting functionality.
The following code clears the RadDatePicker control and opens a new browser:
| ActiveBrowser.Manager.Desktop.KeyBoard.KeyPress(System.Windows.Forms.Keys.Return); |
Automating a click away from the RadDatePicker control incites an error message saying that there are no active browsers:
| ActiveBrowser.Find.ById<HtmlInputText>("ctl00_ContentPlaceHolder1_ctl00_dateInput_text").MouseClick(); |
There are no active browsers. Please make sure you have atleast one browser instance launched for automation using Manager.LauncheNewBrowser().
So, I'm stumped. Can you offer any advice?
Thanks!
David
{
// Set 'input_Text_Inputfelt' text to 'renamed.png'
HtmlInputText input_Text_Inputfelt = Pages.Dynamicweb_7__Dynamicweb_administration_0.Frame_right.input_Text_Inputfelt;
input_Text_Inputfelt.Wait.ForExists(10000);
input_Text_Inputfelt.Text = "renamed.png";
}
Is there a way to conclude this code with a 'return', 'submit' or something?
Kind regards
Christian