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
Hi,
I have on page RadDatePicker
<tel:RadDatePicker ID="dpStartDate" runat="server" DateInput-ID="diStartDate"> |
<Calendar ID="c1" runat="server" FocusedDate="2006-10-30" /> |
<DateInput CatalogIconImageUrl="" Description="" DisplayPromptChar="_" PromptChar=" " |
Title="" TitleIconImageUrl="" TitleUrl="" /> |
</tel:RadDatePicker> |
var SilverLightApp1 = ActiveBrowser.SilverlightApps()[0];
var txtbox500 = SilverLightApp1.FindName("txtbox500");
txtbox500.User.TypeText("Sample Text", 10);
Thanks!