Telerik Forums
Testing Framework Forum
5 answers
333 views
I am trying to run Coded UI tests using Visual Studio 2010, Team Foundation Server 2010, and Test Case Manager 2010. For the most part, I really like this solution, except that it doesn't seem to work when trying to access Telerik controls. For example, every time Action Recorder is used to record steps taken during a test, or when MS TestRunner tries to play a recording on a page with Telerik ASP.NET AJAX Menu controls, the menus get mess up, pushed around, etc. This effectively breaks my ability to use Visual Studio (EVERYONE's base IDE) to create recorded UI tests. This, in turn, seems to break my ability to take advantage of Test Case Management Studio's integration with Team Foundation Server 2010 (TFS), such as the creation of TFS Work Items of the Test Case type. That, in turn, removes my ability to run reports against these tests, in order to track test run success over time, quality of my builds over time, etc. Overall, this is a LOT to lose simply because Telerik causes Action Recording to break.

So, my question is, what options do I have in this situation? I am not excited about the possibility of having to use Telerik testing solutions simply because Telerik breaks Microsoft's base solution. But, if that is the only option I have, I'll explore it out of necessity. Does Telerik's Test Suite support Coded UI tests? Does it support Action Recording, as Visual Studio 2010 does? And, does it support integration with Team Foundation Server 2010 as does Test Case Manager 2010?
lora
Top achievements
Rank 1
 answered on 21 Nov 2011
9 answers
212 views
Hi all.

Migrating our tests from WebAii 1.1 to WebAii 2.0, I suspect a strange behavior of Manager.Browsers.Count field.

The problem is that the count of actually opened browser windows is less than Manager.Browsers.Count.
How we get into this situation: our application opens its main window, then opens a modal window (HTML page, not an alert; Manager.Browsers.Count is now 2),
then a button on the modal window is pressed, so the window closes. But Manager.Browsers.Count does not become 1, as expected.

In our tests we usually check the count of the open windows to know whether the report window was successfully closed or not, so this option is vital for us. 

Thus I wonder if it could be fixed in some way.

Best regards,
Yaroslav
Stoich
Telerik team
 answered on 21 Nov 2011
2 answers
146 views
Hi,

I'm using the Telerik Testing Framework to create an automation framework to test our Silverlight application. There are a few instances where clicking a button requires a wait for another element on the screen to become usable. I wrap the button controls like so:

public class Button
    {
        public RadButton Control;
         
        public Button() { }
 
        public Button(string automationId)
        {
            AutomationId = automationId;
            Control = Manager.Current.ActiveBrowser.SilverlightApps()[0].Find.ByAutomationId<RadButton>(automationId);
        }
 
        public string AutomationId { get; set; }
 
        public void Click()
        {
            this.Control.User.Click();
        }
....
}

In some cases, however, clicking on a particular button requires a wait for some other control. The test script should have no idea that it needs to wait for another control after clicking a particular button. So, where I'm initialising the button instance itself, I am thinking to pass in a string of a method which contains the code in order to wait for another control on the screen to become usable (or whatever other code it needs) - and will need to overload Button.

But I'm not really sure what the best way is of doing this - I've had a look at InvokeMethod, maybe that will help?

Is someone able to point me in the right direction?

Thanks :)
Plamen
Telerik team
 answered on 21 Nov 2011
1 answer
292 views
Hi,

objParent.Find.ByName("txtName").TextContent
  
Output : ""  (Empty String)

But the same

objParent.Find.ByName<TextBox>("txtName").Text
  
Output : String Value

Framework Version : "2011.1.609.0"

Thanks,
Siva
Plamen
Telerik team
 answered on 18 Nov 2011
1 answer
139 views
Hi,
I am writing a test script using MS test and Webaii in which i have to fill in a application form.On the save of the form the system checks for the mandatory feilds if not prompts a javascript alert message that the mandatory feilds a,b,c are not filled.
I need to capture and log this step in my code test
I did the floowing to try capture the script alert

           Settings.Current.UnexpectedDialogAction = UnexpectedDialogAction.HandleAndFailTest;
           manager.DialogMonitor.Start();
// Attempted to check if the line below captures the dialog
           int counter= manager.DialogMonitor.Dialogs.Count;
//This actually adds a dialog --- not what is needed

            manager.DialogMonitor.AddDialog(new AlertDialog(manager.ActiveBrowser,DialogButton.OK));


Any help appreciated

Stoich
Telerik team
 answered on 18 Nov 2011
0 answers
123 views
Please ignore
Saket
Top achievements
Rank 1
 asked on 17 Nov 2011
1 answer
141 views

I have the DOM for a button in the below fashion

<input name="TestButton" class="action-button" id="TestButton" role="button"  type="submit" jQuery15109470652432947769="3" value="Test"/>

Im getting the HTMLInputSubmit control by Findexpression (id="TestButton")

If i perform Click Action it is not working.

Tried HTMLInputSubmit.MouseClick and it works in my local machine

And in my test run, which triggers this in remote machines, this fails to perform MouseClick action.

also tried InvokeScript(JqueryScripts.ClickbyID() with script event type set to OnClick - Not Working

Anybody can shed some light on this ??

Anthony
Telerik team
 answered on 16 Nov 2011
5 answers
154 views
Hi,

I am using Webaii with VS2010 test suite, wanted to know can i some how have the record and play action implemented in code ?


Thanks,
Saket
Cody
Telerik team
 answered on 15 Nov 2011
3 answers
129 views
hi, my problem is I need take the content of cell <td> for the Price1 and Price2, and this doesn't work

(Pages.HTMLTables.Table.Find.AllByExpression<HtmlTableCell>("tagname=td")[0].TextContent);

<TABLE class=Table ><THEAD>
<TR>
<TD class=first-child width=150> Name</TD>
<TD width=100>Cruise Rate</TD>
<TD width=135>
<DIV class=table-align>Government <BR>Fees &amp; Taxes <SPAN class="tooltip 3></A> </SPAN></DIV></TD>
<TD width=136>Vacation <BR>Protection <A class="thickbox learn-more" >Learn More</A> </TD>
<TD class=last-child width=116>Total</TD></TR></THEAD>
<TBODY>
<TR class=first-child>
<TD class=first-child><STRONG>Price1</STRONG></TD>
<TD>$289.00</TD>
<TD>$62.59</TD>
<TD class=td-vpp><A class="remove addRemoveVPLink" href="#" rate="$49.00">Remove $49.00</A>
 <INPUT type=hidden name=addVPSeqNumbers TeaLeaf="true"> </TD>
<TD class=last-child align=right><STRONG>$400.59</STRONG></TD></TR>
<TR>
<TD class=first-child><STRONG> Price2</STRONG></TD>
<TD>$289.00</TD>
<TD>$62.59</TD>
<TD class=td-vpp><A class="remove addRemoveVPLink" href="#" rate="$49.00" >Remove $49.00</A> <INPUT type=hidden name=addVPSeqNumbers TeaLeaf="true"> </TD>
<TD class=last-child align=right><STRONG>$400.59</STRONG></TD></TR>
Anthony
Telerik team
 answered on 15 Nov 2011
23 answers
397 views
Hi guys,

I’m getting “Wait for condition has timed out” exceptions when calling LaunchNewBrowser. The strange thing is that this problem doesn't happen all the time (except in one case, see below).

Stacktrace:
   at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)
   at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
   at ArtOfTest.WebAii.Core.Manager.WaitForBrowserToConnect(Int32 browserIndexToWaitFor)
   at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments)
   at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect)

Things to note about our setup:

1.    We are using Telerik Testing Framework 2011.1 (2011.1.609). However, this problem also happened when we were running version 2010.1.

2.    On most of our servers (a mix of Server 2003, 2008, 32 bit, 64 bit, IE8, IE9) we’re getting this message regularly, but not all the time. Roughly, 80% of the time there is no problem, 20% is showing this exception (or similar problems). Usually, it helps to just retry calling .LaunchNewBrowser, but not always.

3.    When this happens, a new browser is started and visible without any delays, but Telerik Testing Framework is not able to connect to it (see below).

4.    As of today, we have one new Server 2003 which always displays this behavior. This server has never had an earlier version of Telerik Testing Framework, but when I install the version we used previously (2010.1), we’re seeing normal behavior (80% OK, 20% error).

5.    I’m including a snippet of our application’s trace log.

Framework: InternetExplorerActions.LaunchNewBrowserInstance() : Process launched (ID=5460, Path="\Device\HarddiskVolume1\Program Files\Internet Explorer\IEXPLORE.EXE", Arguments="-nomerge about:blank").
Framework: InternetExplorerActions.LaunchNewBrowserInstance() : Attempting to attach on IE frame (HWND=197334)...
Framework: InternetExplorerActions.LaunchNewBrowserInstance() : Process "URLTester" (ID=2728) is assumed to host the controller.
Uncategorized: Connector.InjectCode() : ------- Function Start 'Connector.InjectCode' -------
Uncategorized: Connector.InjectCode() : Connection string: C:\WINDOWS\assembly\GAC_MSIL\ArtOfTest.InternetExplorer\2011.1.609.0__5339893a7cefe4d6\ArtOfTest.InternetExplorer.dll?ArtOfTest.InternetExplorer.ArtOfTestPluginEntryPoint?2728
Framework: InternetExplorerActions.WaitForDocument() : Attempting to get IHTMLDocument2 from Internet Explorer HWND 197334 on another thread...
Uncategorized: <>c__DisplayClasse.<WaitForDocument>b__7() : Attempting to get document from window handle
Framework: InternetExplorerActions.WaitForDocument() : IHTMLDocument2 successfully retrieved.
Framework: Connector.InjectCode() : Sending WM_COPYDATA to HWND 197334 (lpData = "C:\WINDOWS\assembly\GAC_MSIL\ArtOfTest.InternetExplorer\2011.1.609.0__5339893a7cefe4d6\ArtOfTest.InternetExplorer.dll?ArtOfTest.InternetExplorer.ArtOfTestPluginEntryPoint?2728")...
Framework: Connector.InjectCode() : Returned from sending WM_COPYDATA (LRESULT=0, GetLastError()=DS_S_SUCCESS).
Uncategorized: Connector.InjectCode() : ------- Function End 'Connector.InjectCode' -------
<The exception occurs after this point>

6.    If I compare this with the log of regular (correct) cases, I'm missing this part:

Framework: BrowserProvisioner.ServiceThread() : A new client has connected to the provisioning pipe.
Framework: BrowserRemoted.AsyncListenerThreadEntry() : Not connected; this will now wait indefinitely for a pipe client connection...
Framework: BrowserRemoted.AsyncListenerThreadEntry() : A new client has connected to the pipe.
Framework: BrowserRemoted.AsyncListenerThreadEntry() : Now waiting indefinitely for a command from the pipe client...
Framework: Manager.AddNewBrowser() : Added client ID "Client_81b0ef79-6ece-4f38-97e1-1332561eab77" (now there is/are 1 total).
Framework: Connector.InjectCode() : Returned from sending WM_COPYDATA (LRESULT=0, GetLastError()=DS_S_SUCCESS).
Uncategorized: Connector.InjectCode() : ------- Function End 'Connector.InjectCode' -------

7. Therefore, either the client is not connecting through the pipe, or BrowserProvisioner.ServiceThread() isn't running. I looked at the internal ArtOfTest.WebAii code using JustDecompile, in order to try and understand what is happening, but I haven't been able to figure out which code is calling BrowserProvisioner.ServiceThread.

8. I have tried disabling the Named Pipes restriction in Local Security Policies, but this doesn't seem to make any difference, and it wouldn't explain why the problem occurs *some* of the time.

9. Obviously, our servers and browsers are configured as per Telerik's documentation.


Apologies for this long message. We would really like to get some more control over this problem, as it would greatly improve the stability of our software. Please let us know if you need more information. Thanks very much in advance.

Kind regards,
JP
Peter
Top achievements
Rank 1
 answered on 13 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?