Telerik Forums
Testing Framework Forum
1 answer
106 views
Hi,

The Silverlight application I am testing has a popup with the text inside it "Cannot delete ABC." where ABC is the name of the object.

Doing this works and it finds the popup:
var foundPopup = popup.VisualTree.Find.ByExpression(new XamlFindExpression("TextContent=Cannot delete ABC"));


But...
The object isn't always going to be called ABC. I'd like to parameterise it. I was hoping a regular expression or something like that could be used to do this.

What is the best way to have a wildcard substitute for ABC?

Thanks,
Dren
Plamen
Telerik team
 answered on 11 Oct 2012
4 answers
226 views
I am connected to remote desktop and start running the tests on another server, and then i have a very big problem because all the tests fails on the moment when the mouse action is needed. The problem occurs when the remote window is minimalized or closed. The tests run fine if the focus is on the remote window.
Plamen
Telerik team
 answered on 11 Oct 2012
5 answers
911 views

Hi

There is a testlist that contains some tests.If i run the testlist in VS,it will not execute all the tests due to the MSTest.exe fail to work.The report shows that "Process is terminated due to StackOverFlowException".So,i want to know how to cause the StackOverFlowException and how can i avoid the exception and solve the problem?

Thanks

Plamen
Telerik team
 answered on 10 Oct 2012
1 answer
121 views

Hello.

I have a problem with frames.

My code:

var frame1 = ActiveBrowser.Frames["leftFrame"];
frame1.Find.ByXPath<HtmlSpan>("/html/body/form/span[2]/div/div/div/span").Click();
and Html:

<frameset cols="*,70%">
<frame scrolling="auto" src="/webstudio-test/faces/pages/modules/trace/tree.xhtml?first=true&uri=file%3A%2FC%3A%2Fopenl-tests%2Fuser-workspace%2Fa1%2FLLZIHOD%2Frules.xls%3Fsheet%3DRules%26range%3DB3%253AE13" name="leftFrame">
<html>
<head>
<body>
<form id="j_idt5" enctype="application/x-www-form-urlencoded" action="/webstudio-test/faces/pages/modules/trace/tree.xhtml" method="post" name="j_idt5">
<input type="hidden" value="j_idt5" name="j_idt5">
<span class="traceTreeParams">
<span id="j_idt5:traceTree">
<div id="j_idt5:j_idt8" class="rf-tr tree">
<div id="j_idt5:j_idt8:1:j_idt9" class="rf-tr-nd rf-tr-nd-colps rf-tr-nd-last">
<div id="j_idt9" class="rf-trn">
<span class="rf-trn-hnd-colps rf-trn-hnd"></span>
<span class="rf-trn-cnt">
</div>
<div id="j_idt5:j_idt8:1.1:j_idt12" class="rf-tr-nd rf-tr-nd-colps rf-tr-nd-last">
</div>
<input id="j_idt5:j_idt8__SELECTION_STATE" class="rf-tr-sel-inp" type="hidden" value="" name="j_idt5:j_idt8__SELECTION_STATE">
<script type="text/javascript">
</div>
</span>
<input id="javax.faces.ViewState" type="hidden" autocomplete="off" value="3034330929021769213:-4432157085689481536" name="javax.faces.ViewState">
</form>
</body>
</html>
</frame>
<frame scrolling="auto" src="/webstudio-test/faces/pages/modules/trace/showTraceTable.xhtml?first=true&uri=file%3A%2FC%3A%2Fopenl-tests%2Fuser-workspace%2Fa1%2FLLZIHOD%2Frules.xls%3Fsheet%3DRules%26range%3DB3%253AE13" name="mainFrame">
<noframes> <body> <p>To view content you need frames capable browser</p> </body> </noframes>
</frameset>

In FF works fine but in IE9 throw exception: 

          • System.NullReferenceException: Object reference not set to an instance of an object at click method.
          • Env: Win7 x64, IE9 x32. WebAii 2012.2 920.

Stoich
Telerik team
 answered on 09 Oct 2012
8 answers
282 views
Hi Guys

I'm using the Telerik Testing Framework (C#) and implementing the Telerik libraries, but there is a problem executing the Click method of an Anchor that is inside of a Span, this problem only presents with IE browser, instead of Click i need to do a MouseClick action.

This behavior only presents over one specific object of the application tested, in other anchor I don't have to deal with that problem, also noticed that with Firefox and Chrome the Click method works perfectly okay.

MouseClick works but is not the ideal way because we have a dependency of the mouse action and the focus/display on the application, I mean MouseClick don't work for Continuous Integration

 

 

if (myManager.ActiveBrowser.BrowserType != BrowserType.InternetExplorer)

 

{

 

 

    myManager.ActiveBrowser.Find.ByExpression<HtmlAnchor>("href=#", "innerText=" + GetLangInfo("Name")).Click();

 

}

 

 

else

 

 

 

    myManager.ActiveBrowser.Find.ByExpression<HtmlAnchor>("href=#", "innerText=" + GetLangInfo("Name")).MouseClick();

 



Any help would be really appreciated

Julio Cesar
Julio
Top achievements
Rank 1
 answered on 03 Oct 2012
1 answer
106 views
I'm doing some validation my my test to verify certain text exists on a page and it's always failing. Is there a property to see what text the "ContainsText" method is searching? (e.g. Manager.ActiveBrowser.Text)

Plamen
Telerik team
 answered on 01 Oct 2012
17 answers
437 views
Hi,

Is there a way to attach an existing IE (or any other browser) instance through the automation code ? I was using the Telerik.WebAii library and was unable to find any method to do this. Please do let me know if there is a way to do it ?

Regards,
Diwakar Gupta.
Plamen
Telerik team
 answered on 28 Sep 2012
4 answers
154 views

Hi Telerik Team,
I am facing problems with a zero sized textblock.

I used this, because Telerik Test Studio can't see the properties of my UserControl.
So I put a zero sized textblock directly under this UserControl.  (See Screenshot 1 & WPF-Code).

               
<StackPanel Grid.Column="1" Grid.RowSpan="2">

             <ToggleButton x:Name="PlayButton"

                              Margin="3,0,0,0"

                              Content="{StaticResource PlayShape}"

                              HorizontalAlignment="Center"

                              VerticalAlignment="Top"

                              Foreground="#FFFFFFFF"

                              Style="{StaticResource CJ_ToggleButtonStyle}"

                              RenderTransformOrigin="1.053,0.985"

                              Height="50"

                              Width="80"

                              ToolTipService.ToolTip="{Binding Path=LanguageResources.Play_Pause, Source={StaticResource Localizer}}"/>

                    <TextBlock x:Name="QAPlayerTimeCode" Width="0" Height="0" ></TextBlock>

                </StackPanel>

I try to add this Control over the DOM Control (because I can't see it). But when I do this, a second project is created (!). (See Screenshot 2).

And during runtime I get an exception, because appIndex  is "-1".

ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl plugin = Get<ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl>("tagname=object", "type=~application/x-silverlight");
int appIndex = plugin.OwnerBrowser.GetSilverlightAppIndex(plugin);

How can I access this control?
If it is visible (hight and width over 1px) a can add and access it. But I need to use "hidden" Controls.

Greetings
Mostafa

Plamen
Telerik team
 answered on 28 Sep 2012
1 answer
64 views
Hi,

Can we access search attributes like Automation Id, Name from a already searched element at runtime?

For Example - 
If I have a control with automationID and Name attributes associated with it.
return Get<ArtOfTest.WebAii.Silverlight.UI.Button>("AutomationId=SearchButton","Name=SButton","XamlTag=button");

Is there any way so that during run time i can print the AutomationId, Name, XamlTag of the control?

Thanks,
Prachi
Plamen
Telerik team
 answered on 28 Sep 2012
3 answers
91 views
Is there a known issue for this method? I am finding that it only returns elements found in the VisualTree.Root. Meaning that if there are any Popups active/visible, they will not be included in the ElementsFromPoint return list. In this way it is not truly returning all available elements at the given point. Please advise.

Plamen
Telerik team
 answered on 21 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?