Telerik Forums
Testing Framework Forum
5 answers
239 views
Using: ArtOfTest.WebAii.dll 2011.2.1108.0.
Windows 7 x64 / VS2010 / Mstest / Silverlight 4.

Calls to ComboBox.SelectItemByText(...) fail on a databound combobox.  In fact, app.Find.ByTextContent(...) also fails.  I have attached a minimal test project that has two MsTest tests that demonstrate the issue. 

This seems like very basic functionality, so I'm hoping I'm missing something here, otherwise can someone confirm if this is a bug?

Thanks.
Plamen
Telerik team
 answered on 22 Nov 2011
5 answers
345 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
223 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
156 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
308 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
148 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
132 views
Please ignore
Saket
Top achievements
Rank 1
 asked on 17 Nov 2011
1 answer
151 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
165 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
136 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?