Telerik Forums
Testing Framework Forum
1 answer
299 views
Hi
I opened jquery dialog modal confirmation (http://jqueryui.com/demos/dialog/#modal-confirmation). There are two buttons. But I can't click any of them. In my case it looks like that:
<body ...>
<form class="class1" ....>
<div class="class1-1" ....> //dialog title
<div class="class1-2" ...> //dialog content
<div class="class1-3" ....> //dialog buttons panel
<div class="class1-3-1" ...> //dialog buttons
<button type="button" jQuery1234="4"> Yes //yes button
<button type="button" jQuery2345="5"> No //no button
I tried:
HtmlDiv popup1 = myManager.ActiveBrowser.Find.ByAttributes<HtmlDiv>("class=class1");
HtmlControl buttons = popup1.Find.ByAttributes<HtmlControl>("class=class1-3-1");
HtmlButton button1 = buttons.Find.ByContent<HtmlButton>("No");
I also tried:
HtmlControl button = popup1.Find.ByNodeIndexPath<HtmlControl>("2/0/1");

My objects are not null. VS shows that button or button1 is {HtmlButton:<BUTTON jQuery2345="5">}. But button.Click() or button1.Click() does not work. There is even no error.

I also tried:
IList<HtmlInputButton> allbuttons = button.Find.jQuery().tag("button").button(); but in this case allbuttons is null.

Can you help me to click on it?




Anna
Top achievements
Rank 1
 answered on 28 Mar 2011
1 answer
104 views
Hello,
We are not able to capture  'Silverlight' rightclick context menu item using telerik.

We can bring this context menu by right clicking on any silverlight page.

See attachment for more details.

Thanks,
Prachi
Anthony
Telerik team
 answered on 25 Mar 2011
1 answer
102 views
Hi,
In my project, a test case contains lots of components. and all my components are parametic.  
My project requries one component inherits one sheet data of  parent.
But i found that a test case only can build one Excel sheet, it means that all components only can inherit one Excel sheet.
So whether one componet inherit one parent's sheet?
 If yes, how to carry it out?

Thanks
Best Regards
Stoich
Telerik team
 answered on 24 Mar 2011
3 answers
122 views
I want to find is there cell with searched content. From silverlight application I select table and put it to Element Explorer with name GrdRadgridview.
Then I try to find cell with
    <CodedStep("Find In DataGrid", RequiresSilverlight:=True)> _
    Public Sub FindInRow()
        Dim app As SilverlightApp = ActiveBrowser.SilverlightApps()(0)
        app.VisualTree.Refresh()
        Dim FindCell As DataGridCell = Pages.UIManagerCMXaml.SilverlightApp.GrdRadgridview.Find.ByExpression(New XamlFindExpression("TextContent=TEST")).[As](Of DataGridCell)()
    End Sub

but got message
The control type 'ArtOfTest.WebAii.Silverlight.UI.DataGridCell' does not match the xaml tag 'textblock'

even if there is cell with searched value.

Ivan
Stoich
Telerik team
 answered on 24 Mar 2011
0 answers
107 views
Hi,

I have three virtual machines with windows server 2003. First have Ie6,
second IE7 and the last one IE8 installed browser. All of them have Chrome,
Safari and FireFox.
I configured all browsers (particulary IE) with document from your website.


When I run simple test in all browsers, it only works in FF, safari and
chrome. In IE (in all version) I have only blank page.
I  disabled IE ESC in all machines, but it still doesn’t work.

In using Webaii framework 2010.3.1307.0 version 

My test code:
//...
//settings
Manager.LaunchNewBrowser(BrowserType.InternetExplorer, true,
ProcessWindowStyle.Maximized); browser = Manager.Browsers[0]; browser.NavigateTo("http://www.google.com";);
browser.Close();


ag


I changed webaii version from 2010.3.1307 to 2010.3.1421 and now it's working on IE7 and IE8.
ag

Aga
Top achievements
Rank 1
 asked on 24 Mar 2011
7 answers
251 views
After every test I run with WebAii as soon as I close the browser or clean up the test I get the following exception :

---- UNHANDLED EXCEPTION ----<BR>Thread Name:   
RemotedAsyncCommandListener<BR>System.Threading.ThreadAbortException: Thread was   
being aborted.<BR>&nbsp;&nbsp; at   
ArtOfTest.WebAii.Messaging.Process.BrowserRemoted.AsyncListener()<BR>&nbsp;&nbsp;   
at System.Threading.ThreadHelper.ThreadStart_Context(Object   
state)<BR>&nbsp;&nbsp; at System.Threading.ExecutionContext.runTryCode(Object   
userData)<BR>&nbsp;&nbsp; at   
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode   
code, CleanupCode backoutCode, Object userData)<BR>&nbsp;&nbsp; at   
System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext,   
ContextCallback callback, Object state)<BR>&nbsp;&nbsp; at   
System.Threading.ExecutionContext.Run(ExecutionContext executionContext,   
ContextCallback callback, Object state, Boolean ignoreSyncCtx)<BR>&nbsp;&nbsp;   
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext,   
ContextCallback callback, Object state)<BR>&nbsp;&nbsp; at   
System.Threading.ThreadHelper.ThreadStart() 



I get this even though the test itself has passed.

I would like to hide this exception or at least not display in the console.writeline as it suggests the test has failed when it has not.

I have tried playing with various settings including lots of configurations like

 

 

Settings settings = GetSettings();

 

settings.EnableSilverlight =

 

true;

 

settings.CreateLogFile =

 

false;

 

Initialize(settings);

I have also tried catching the ThreadAbortException but it seems this is already being caught inside the WebAii internals and then the above log gets written each time.
Stoich
Telerik team
 answered on 22 Mar 2011
4 answers
146 views
Hello,

We are currently running into a issue using safari where we are unable to run more than a few test cases in one run.  This even happens with the Sample code that ships with WebAii. 

Here is what I did in the sample code.
  1. In app.confg change configuration\WebAii.Settings\defaultBrowser="Safari"
  2. Build
  3. Open Test List Editor
  4. Run the first 5 test cases

Here is the output from the run:
Passed QuickStarts_VSTS_CS.UsingAspNetDevSrv.UseAspNetDevServer 
 
Failed QuickStarts_VSTS_CS.AjaxSupport.WaitingForMultiplePageChanges Initialization method QuickStarts_VSTS_CS.AjaxSupport.MyTestInitialize threw exception. System.TimeoutException: System.TimeoutException: Wait for condition has timed out. 

Failed QuickStarts_VSTS_CS.TestRegions.AccessingTestRegions Assert.IsTrue failed.  

Failed QuickStarts_VSTS_CS.TestRegions.AccessingElementsUsingTestRegions Test method
QuickStarts_VSTS_CS.TestRegions.AccessingElementsUsingTestRegions threw exception:
... 

Failed QuickStarts_VSTS_CS.TestRegions.UsingFindParamAttributeWithTestRegions Test method QuickStarts_VSTS_CS.TestRegions.UsingFindParamAttributeWithTestRegions threw exception:
... 

Error QuickStarts_VSTS_CS.AjaxSupport.WaitingForSinglePageChange The agent process was stopped while the test was running. 


The first one always passes for me. After that however is seems the environment gets in a bad state and nothing will pass from that point onwards.

Is this a known issue with Safari? 
Does anyone know of any workarounds?

We are currently blocked by this and I need to find a workaround as soon as possible.

Thanks,
Chris

Chris
Top achievements
Rank 1
 answered on 10 Mar 2011
9 answers
283 views
Hi,

I'm having an issue running automated tests driving a silverlight app.  I've gone through all the browser configuration and checked I can run sample tests without an issue, so it's likely to be something wrong in my code.

The Manager settings are initialised as:

 var settings = new Settings
                               {
                                   EnableSilverlight = true,
                                   ExecutionDelay = 50,
                                   EnableUILessRequestViewing = false,
                                   QueryEventLogErrorsOnExit = false,
                                   EnableScriptLogging = false,
                                   AnnotateExecution = true,
                                   AnnotationMode = AnnotationMode.All,
                                   RecycleBrowser = true,
                                   DefaultBrowser = BrowserType.InternetExplorer,
                               };


The browser is connecting via https with navigation and automation on htmlinput elements working OK, but whenever it tries to connect to the silverlight app I get the stack trace below - tested on two seperate machines (one server 2003 x86,  one windows 7 x64):

ArtOfTest.WebAii.Exceptions.ExecuteCommandException : ExecuteCommand failed!

InError set by the client. Client Error:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x000003E9): System.TypeInitializationException: The type initializer for 'ArtOfTest.WebAii.Silverlight.ObjectSerializer' threw an exception. ---> System.InvalidOperationException: Method may only be called on a Type for which Type.IsGenericParameter is true.

at System.RuntimeType.get_GenericParameterPosition()

--- End of inner exception stack trace ---

at System.Windows.Browser.ManagedObjectInfo.Invoke(ManagedObject obj, InvokeType invokeType, String memberName, ScriptParam[] args)

at System.Windows.Hosting.ManagedHost.InvokeScriptableMember(IntPtr pHandle, Int32 nMemberID, Int32 nInvokeType, Int32 nArgCount, ScriptParam[] pArgs, ScriptParam& pResult, ExceptionInfo& pExcepInfo)

--- End of inner exception stack trace ---

at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)

at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)

at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)

at ArtOfTest.InternetExplorer.JsObjectWrapper.Call(String methodName, Object[] args)

at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessSilverlightCommand(BrowserCommand request)

at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)

BrowserCommand (Type:'Silverlight',Info:'NotSet',Action:'NotSet',Target:'ElementId (tagName: 'object',occurrenceIndex: '0')',Data:'{"Method":null,"Property":null,"Reference":null,"Reference2":null,"Type":10,"Value":"FrameworkElement;CheckBox;ChildWindow;ComboBox;DataGridCell;DataGridRow;DataGrid;RadioButton;RepeatButton;DataGridCellsPresenter;DataGridColumnHeader;DataGridColumnHeadersPresenter;DataGridDetailsPresenter;DataGridFrozenGrid;DataGridRowHeader;DataGridRowsPresenter;Calendar;CalendarButton;CalendarDayButton;CalendarItem;DatePicker;DatePickerTextBox;GridSplitter;PreviewControl;TabControl;TabItem;TabPanel;Shape;Path;Ellipse;Line;Polygon;Polyline;Rectangle;Glyphs;Panel;Image;Canvas;TextBlock;MediaElement;InkPresenter;MultiScaleImage;StackPanel;Control;TextBox;PasswordBox;Grid;ItemsControl;Border;ContentControl;ContentPresenter;ItemsPresenter;Popup;UserControl;ButtonBase;Button;ToggleButton;Selector;HyperlinkButton;ListBox;RangeBase;ScrollBar;Thumb;ScrollContentPresenter;ScrollViewer;Slider;ToolTip;ProgressBar;ListBoxItem;ComboBoxItem;VirtualizingStackPanel;"}',ClientId:'Client_d284ca17-4bc1-4219-a0e9-56a2af98f06b',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x000003E9): System.TypeInitializationException: The type initializer for 'ArtOfTest.WebAii.Silverlight.ObjectSerializer' threw an exception. ---> System.InvalidOperationException: Method may only be called on a Type for which Type.IsGenericParameter is true.

at System.RuntimeType.get_GenericParameterPosition()

--- End of inner exception stack trace ---

at System.Windows.Browser.ManagedObjectInfo.Invoke(ManagedObject obj, InvokeType invokeType, String memberName, ScriptParam[] args)

at System.Windows.Hosting.ManagedHost.InvokeScriptableMember(IntPtr pHandle, Int32 nMemberID, Int32 nInvokeType, Int32 nArgCount, ScriptParam[] pArgs, ScriptParam& pResult, ExceptionInfo& pExcepInfo)

--- End of inner exception stack trace ---

at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)

at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)

at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)

at ArtOfTest.InternetExplorer.JsObjectWrapper.Call(String methodName, Object[] args)

at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessSilverlightCommand(BrowserCommand request)

at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')

InnerException: none.

at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)

at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)

at ArtOfTest.WebAii.Silverlight.SilverlightProxy.ExecuteSLCommand(SilverlightCommand cmd)

at ArtOfTest.WebAii.Silverlight.SilverlightProxy.PublishKnownControlTypes(List`1 knownTypes)

at ArtOfTest.WebAii.Silverlight.SilverlightApp.Connect(Int32 timeout)

at ArtOfTest.WebAii.Silverlight.SilverlightApp.Connect()

at ArtOfTest.WebAii.Silverlight.SilverlightAppsList.get_Item(Int32 index)

Helpers\TestHelper.cs(15,0): at Insurer.Analytics.Acceptance.Test.Helpers.TestHelper.get_SilverlightApp()

Cody
Telerik team
 answered on 10 Mar 2011
1 answer
161 views
I'm trying to press Shift+Home on my control, I've tried a few things, but the control always interprets the key presses as if the shift key wasn't pushed (i.e. it still acts on the Home key, but not as if shift was pushed). The control works fine in manual testing.

The weird thing is, if at any point I stop the code between the shift key down and the shift key up, then the shift key is definitely pushed as every program in Windows acts like it is, even the program I'm trying to test.
Here's what I've tried:
1)*
myFrameworkElement.User.KeyDown(Keys.ShiftKey);
myFrameworkElement.User.KeyPress(Keys.Home);
myFrameworkElement.User.KeyUp(Keys.ShiftKey);
2)
myFrameworkElement.User.KeyPress(Keys.ShiftKey | Keys.Home);
3)**
silverlightApp.Desktop.KeyBoard.KeyDown(Keys.ShiftKey);
silverlightApp.Desktop.KeyBoard.KeyPress(Keys.Home);
silverlightApp.Desktop.KeyBoard.KeyUp(Keys.ShiftKey);
4)
silverlightApp.Desktop.KeyBoard.KeyPress(Keys.ShiftKey | Keys.Home);
5)
var keys = Keyboard.KeysFromString("Shift+Home");
silverlightApp.Desktop.KeyBoard.KeyPress(keys);

Any help on how to accomplish this would be great.

* myFrameworkElement is ArtOfTest.WebAii.Silervlight.FrameworkElement
**silverlightApp is ArtOfTest.WebAii.Silervlight.SilverlightApp
Ray
Top achievements
Rank 1
 answered on 08 Mar 2011
1 answer
103 views
Hi,

I'm using WebAii to write automated tests for a Silverlight application.  Recently, some the RadComboBoxes in the app have been changed to use the VirtualizingStackPanel.  The following test code now fails with the following error:  

  • Code Sample - int saveCount = radComboBox.Items.Count;
  • Error Generated - System.TimeoutException:  Wait for condition has timed out.

This will happen on any statement that attempts to reference the Telerik.WebAii.Controls.Xaml.RadComboBox Items property,

How do I get this to work (or what's the work around) when the VirtualizingStackPanel is used with the RadComboBox control?

Thanks.

Joel
Boyan
Telerik team
 answered on 07 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?