Dear Team,
I recently started working on this tool, previously I worked on several automation tools like Testpartner and QTp.
Now I’m glad to work on webui. I came to know it’s possible do scripting in telerik in either vb or c#.
And I find there is option like converting the static recorded steps into required format of script. I am requesting you to help me, to work more on scripting part which helps to reach complete test case coverage as well as scenario coverage.
Is there any option available to record script directly rather as static steps?? So that I can where can I add the script and how can I continue further.
Thanks in advance,
Sailaja
6 Answers, 1 is accepted
Thanks for evaluating WebUI Test Studio, we hope you find it useful for your testing requirements.
WebUI records steps that would simulate user interactions with your pages, from which you can create further test steps that verifiy the conditions on your pages.
From what you describe, please try to record as much of your testing scenario as possible using the recording ability.
For any advance scenarios, you can use custom coded steps and converting the WebAii test completely to Unit Test code as described in this customize your test and debugging test code.
Please let us know if you have any further questions.
Kind regards,
Nelson Sin
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.
Yes Nelson,
I observed several interesting assets in webuii. Many of them are customized which really helps to work with ease.
Right now I am using trail version. It’s a bit convenient for me to work in unit test level script rather then general script level. But I find a limit access for that in trail version.
And The code I added to the script is not executing, even a normal message box is not appearing.
Here I am posting the sample code of the script, which is not working properly…
Please help me in this issue... Thanks in advance
Imports Telerik.WebAii.Controls.Xaml
Imports Telerik.WebAii.Controls.Html
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports ArtOfTest.WebAii.Controls.HtmlControls
Imports ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts
Imports ArtOfTest.WebAii.Core
Imports ArtOfTest.WebAii.ObjectModel
Imports ArtOfTest.WebAii.TestAttributes
Imports ArtOfTest.WebAii.TestTemplates
Imports ArtOfTest.WebAii.Win32.Dialogs
Imports ArtOfTest.WebAii.Silverlight
Imports ArtOfTest.WebAii.Silverlight.UI
Imports MbUnit.Framework
Imports MbUnit.Core.Framework
Namespace Test_auto2
''' <summary>
''' UI Automated test for test1UnitTest
''' </summary>
<TestFixture()> _
Public Class test1UnitTest
Inherits BaseTest
#Region "[ Setup / TearDown ]"
''' <summary>
''' Initialization for each test.
''' </summary>
<SetUp()> _
Public Sub MyTestInitialize()
' Initializes WebAii manager to be used by the test case.
' If a WebAii configuration section exists, settings will be
' loaded from it. Otherwise, will create a default settings
' object with system defaults.
' Pass in 'true' to recycle the browser between test methods
Initialize(False)
' If you need to override any other settings coming from the
' config section or you don't have a config section, you can
' comment the 'Initialize' line above and instead use the
' following:
'
'
' // This will get a new Settings object. If a configuration
' // section exists, then settings from that section will be
' // loaded
'
' Settings settings = GetSettings();
'
' // Override the settings you want. For example:
' settings.DefaultBrowser = BrowserType.FireFox;
'
' // Now call Initialize again with your updated settings object
' Initialize(settings);
'
'
'
' Place any additional initialization here
'
End Sub
''' <summary>
''' Clean up after each test.
''' </summary>
<TearDown()> _
Public Sub MyTestCleanUp()
'
' Place any additional cleanup here
'
' Shuts down WebAii manager and closes all browsers currently running
' after each test. This call is ignored if recycleBrowser is set
Me.CleanUp()
End Sub
''' <summary>
''' Called after all tests in this class are executed.
''' </summary>
<TestFixtureTearDown()> _
Public Sub FixtureCleanup()
' This will shut down all browsers if
' recycleBrowser is turned on. Else
' will do nothing.
ShutDown()
End Sub
Private _pages As Pages
Public ReadOnly Property Pages() As Pages
Get
If (_pages Is Nothing) Then
_pages = New Pages(Manager.Current)
End If
Return _pages
End Get
End Property
#End Region
<Test()> _
Public Sub SampleWebAiiTest()
' Launch a browser instance
Manager.LaunchNewBrowser(BrowserType.InternetExplorer)
' The active browser
ActiveBrowser.NavigateTo("http://www.google.com")
' Find the google search box and set it to "ArtOfTest";
Find.ByName(Of HtmlInputText)("q").Text = "ArtOfTest"
' Click the Search button
Find.ByName(Of HtmlInputSubmit)("btnG").Click()
' Validate the search contain the 'ArtOfTest' text
Assert.IsTrue(ActiveBrowser.ContainsText("ArtOfTest"))
End Sub
<Test()> Public Sub test1()
'Launch an instance of the browser
Manager.LaunchNewBrowser()
'Navigate to : 'http://www.google.com/'
ActiveBrowser.NavigateTo("http://www.google.com/")
'Set 'QText' text to 'testing'
Pages.Google.QText.Wait.ForExists(5000)
Pages.Google.QText.Text = "Manual testing"
'Message added by me
MsgBox("Success")
ActiveBrowser.ContentWindow.SetFocus()
Pages.Google.QText.Wait.ForExists(5000)
Pages.Google.QText.ScrollToVisible()
Pages.Google.QText.Focus()
ActiveBrowser.Manager.Desktop.KeyBoard.KeyPress(ArtOfTest.WebAii.Win32.KeyBoard.KeysFromString("Enter"), 150, 1)
ActiveBrowser.WaitUntilReady()
End Sub
End Class
End Namespace
Thanks for posting the code, I was able to get it working on this end with Mb Unit test runner.
Did the original WebAii test this code was generated from work? Does the SampleWebAiiTest mehod at least run correctly?
Please post back with any errors you get when running your test or where specifically the test stops working.
Kind regards,
Nelson
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.
Just wanted to check back on this thread and see if you resolved the error.
I would also like to mention again, for anyone viewing this thread, that we recommend using custom coded steps or generating unit tests when a WebUI user runs into complex or custom test sequences.
Please try to record the majority of tests using the .aii format for reusability, maintenance and upgrading purposes.
Greetings,
Nelson
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.
i added just single line code to populate message box in middle of script.
every line executed well, except the message line.
Its a unit level scripting, i'm trying to explore unit level scripting to automate most demand and advanced scenarios
Thanks in advance,
sailaja
Thanks for the update and the description of what you are using the generated scripts for. Please let us know if you needed any help with them.
Also, though the code you posted previously looks like a proof of concept, please reply back if you needed further assitance with it in case you needed the implementation in your other scripts.
Best wishes,
Nelson
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.