or
Browser frame = myManager.ActiveBrowser.Frames.ById(
"cat"
);
Element testrubrik = frame.Find.ByAttributes(
"title"
,
"Testrubrik"
);
frame.Actions.Click(testrubrik);
myManager.ActiveBrowser.Actions.Click(testrubrik);
myManager.Desktop.Mouse.Click(MouseClickType.LeftClick, testrubrik.GetRectangle());
Imports
Telerik.TestingFramework.Controls.KendoUI
Imports
Telerik.WebAii.Controls.Html
Imports
Telerik.WebAii.Controls.Xaml
Imports
System.Collections.Generic
Imports
System.Text
Imports
System.Linq
Imports
ArtOfTest.Common.UnitTesting
Imports
ArtOfTest.WebAii.Core
Imports
ArtOfTest.WebAii.Controls.HtmlControls
Imports
ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts
Imports
ArtOfTest.WebAii.Design
Imports
ArtOfTest.WebAii.Design.Execution
Imports
ArtOfTest.WebAii.ObjectModel
Imports
ArtOfTest.WebAii.Silverlight
Imports
ArtOfTest.WebAii.Silverlight.UI
Namespace
new_test_project
Public
Class
WebTest
Inherits
BaseWebAiiTest
#Region "[ Dynamic Pages Reference ]"
Private
_pages
As
Pages
''' <summary>
''' Gets the Pages object that has references
''' to all the elements, frames or regions
''' in this project.
''' </summary>
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
' Add your test methods here...
<CodedStep(
"Navigate to : 'http://www.cgwallpapers.com/'"
)> _
Public
Sub
WebTest_CodedStep1()
' Navigate to : 'http://www.cgwallpapers.com/'
ActiveBrowser.NavigateTo(
"http://www.cgwallpapers.com/"
,
True
)
End
Sub
<CodedStep(
"Enter text 'username' in 'Input0Text'"
)> _
Public
Sub
WebTest_CodedStep2()
' Enter text 'username.com' in 'Input0Text'
Actions.SetText(Pages.CGWallpapersCom.Input0Text,
"username"
)
End
Sub
<CodedStep(
"Enter text 'password' in 'Input0Password'"
)> _
Public
Sub
WebTest_CodedStep3()
' Enter text 'password' in 'Input0Password'
Actions.SetText(Pages.CGWallpapersCom.Input0Password,
"password"
)
End
Sub
<CodedStep(
"Click 'LoginDiv'"
)> _
Public
Sub
WebTest_CodedStep4()
' Click 'LoginDiv'
Pages.CGWallpapersCom.LoginDiv.Click(
False
)
End
Sub
<CodedStep(
"Navigate to : 'http://www.cgwallpapers.com/members/viewwallpaper.php?id=1764&res=1920x1080'"
)> _
Public
Sub
WebTest_CodedStep5()
ActiveBrowser.NavigateTo(
"http://www.cgwallpapers.com/members/viewwallpaper.php?id=1764&res=1920x1080"
,
True
)
End
Sub
End
Class
End
Namespace
private HtmlFindExpression modalH2 = new HtmlFindExpression("xpath=//div[@id='tf-modal-window-top']/h2");
ActiveBrowser.WaitForElement(modalH2, SharedValues.LongtTimeout, true);
Test method Iit.TradingFloor.TestWebUI.UrlRedirectionTests.UrlRedirection_Admin_SearchRedirection threw exception:
System.ApplicationException: Exception thrown during the wait for a condition. Error: Unexpected error while waiting on condition. Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Refresh() failed due to an unexpected exception. ---> ArtOfTest.WebAii.Exceptions.FindException: Find Details:
- No FindParams defined.
- Start Element: [Element: 'html:0']
at ArtOfTest.WebAii.ObjectModel.Element.Refresh()
--- End of inner exception stack trace ---
at ArtOfTest.WebAii.ObjectModel.Element.Refresh()
at ArtOfTest.WebAii.ObjectModel.Element.Refresh(Boolean forceDomTreeRefresh)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at ArtOfTest.Common.WaitAsync.CallRefreshIfNeeded[T](T target)
at ArtOfTest.Common.WaitAsync._worker_DoWork[T,V](Object waitParam)