Telerik Forums
Testing Framework Forum
3 answers
88 views

Hello, 

I'm getting some strange problem since I updated my FireFox from 3.5.5 to 3.6.3 last week. When I'm looking for element like this : 

<span xmlns="" class="label_url_addDiscount_constant">
<a href="/PA_Klient_Finanse_Rabaty_DodajRabat_Staly.html?clientID=456083">
<img border="0" src="/buttons/pierwszy/dodaj rabat stały.gif" alt="dodaj rabat stały"/>
</a>
</span>

using code similiar to 

Element el = find.ByExpression("alt=dodaj rabat stały");
actions.Click(el);

i got exception 

'2010-05-05 10:21:54.265 ' - [Trace] : Exception: ExecuteCommandException Message: ExecuteCommand failed!
InError set by the client. Client Error:
mozCommandProcessor: FindElement(): Tag collection is either empty or has less elements than the element occurrence requested.TagName: a4:img, Occurrence Requested: 0, All Tags Collection length: 0
BrowserCommand (Type:'Information',Info:'ElementRectangle',Action:'NotSet',Target:'ElementId (tagName: 'a4:img',occurrenceIndex: '0')',Data:'',ClientId:'Client_4a2adc76-44ce-4b9e-8e28-1c16bc02a364',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'mozCommandProcessor: FindElement(): Tag collection is either empty or has less elements than the element occurrence requested.TagName: a4:img, Occurrence Requested: 0, All Tags Collection length: 0')
InnerException: none.

This happend only in FireFox 3.6.3 in older FF version (3.5.5) everything is fine. 

Konstantin Petkov
Telerik team
 answered on 10 Aug 2010
7 answers
152 views
Totally stuck… Our website loads just fine in Firefox when not using WebAii. However, when I load it with WebAii, I get the white screen of death. I can load other web pages with Silverlight using WebAii. There are no errors in the Firefox Error Console. I notice that WebAii thinks the page is done loading while IIS is still sending the XAP to the browser. However, even if I sit there in debug mode, it never loads the Silverlight control (even after IIS finishes). Maybe there is some kind of timeout? We load our Silverlight control inside of an IFRAME. Totally stuck, any ideas are welcome.
Cody
Telerik team
 answered on 09 Aug 2010
1 answer
101 views
Internet Explorer (7/8, haven't tried others) doesn't honor clearing the cookies until the browser has been closed. Is there any way around this? I'm trying to speed up our tests by using browser persistance, but IE isn't making this simple.
Cody
Telerik team
 answered on 09 Aug 2010
1 answer
74 views
Hi there,
Can your product run with Safari?
Thanks
RC
Konstantin Petkov
Telerik team
 answered on 09 Aug 2010
5 answers
128 views
Hi there,

we are evaluating WebUI Developer edition with WIndows7/VS2010. Our silverlight aplication is using Tooltip property for displaying validation messages on TextBox controls. There was no mean to record that through WebUI. When hover the mouse it was showing a path control instead which doesn't reflect any of the tooltip properties.

Any help is highly appreiciated!

 
Konstantin Petkov
Telerik team
 answered on 06 Aug 2010
5 answers
204 views
Hey all,

I couldn't immediately figure this out, as it doesn't seem obvious, but what controls element lookup timeouts?  Which setting is it?  None of the Manager.Settings properties seems directly related to this particular action.  I have an idea that ExecuteCommandTimeout might, but ExecutionDelay could, too.

I'm extremely tired, so perhaps my observation skills leave something to be desired at the moment.  ;-)


Thanks,
Steven
Cody
Telerik team
 answered on 03 Aug 2010
3 answers
185 views
Hi,

I am using WebAii 2.0 for automating silverlight 3 application.

I need to get all the types in a control through Find . Also it should recursively check the children aslo.

I tried the below but i got nothing

IList

<FrameworkElement> elmnts = grid.Find.AllByType<FrameworkElement>();

I neded this if i am automating any customUserControl which was developed by someone else and i dont know anything about the controls used in that.
So i need to know all the elements in that control.

Also can you suggest some tools to see the visual tree like UISpy.

 


Thanks
Kiran
Konstantin Petkov
Telerik team
 answered on 02 Aug 2010
9 answers
163 views
I am using the 2010.1.713.0 WebAii code with its Telerik.WebAii.Controls.Html.dll Translator for ASP.NET AJAX RAD Controls. I am using the latest controls dll 2010.2.713.35.

var ed2 = Find.ByCustom<Telerik.WebAii.Controls.Html.RadEditor>(a => a.ID.EndsWith("MqTelerikEditor"));

Assert.IsNotNull(ed2, "Did not find the editor");

const string html = "Test Code";

 

ed2.Html = html;

This test fails on the last line with this exception and stack dump.

ArtOfTest.WebAii.Exceptions.ExecuteCommandException : ExecuteCommand failed!
InError set by the client. Client Error:
System.InvalidOperationException: Javascript call [$find(\'ctl00_cContent_ctl00_MqTelerikEditor\').set_html(\'Test Code\')] failed! Please make the function exists and the call is using the correct prototype signature. Javascript error: [object Error] 
   at ArtOfTest.InternetExplorer.IECommandProcessor.InvokeFunction(String functionCall, Boolean useEval, Boolean returnJSON)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
BrowserCommand (Type:'Action',Info:'NotSet',Action:'InvokeJsFunction',Target:'ElementId (tagName: '',occurrenceIndex: '-1')',Data:'$find(\'ctl00_cContent_ctl00_MqTelerikEditor\').set_html(\'Test Code\')',ClientId:'Client_0f07abc3-99d2-47b2-aa1e-aa5d60203816',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.InvalidOperationException: Javascript call [$find(\'ctl00_cContent_ctl00_MqTelerikEditor\').set_html(\'Test Code\')] failed! Please make the function exists and the call is using the correct prototype signature. Javascript error: [object Error] 
   at ArtOfTest.InternetExplorer.IECommandProcessor.InvokeFunction(String functionCall, Boolean useEval, Boolean returnJSON)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')
InnerException: none.


I am guessing there is a miss match with the Translator and that I need a 2010.2 version. Is this due?

When I watch the test run I see the content of the Editor does take the new content just before it crashes out.

John.

Petia
Telerik team
 answered on 02 Aug 2010
4 answers
123 views
Hi Guys, 

Using Nunit, FF (3.0.19), VSE 08. 

I'm using the following code to click a button (AJAX buttons are handled  in a slightly different way..):
public void ClickButtonByGUICaption(String buttonGUIName)
   {
       StringBuilder buffer = new StringBuilder();
       buffer.Append("//input[@value=\"")
             .Append(buttonGUIName)
             .Append("\"]");

       Manager.ActiveBrowser.Find.ByXPath<HtmlInputSubmit>(buffer.ToString()).Click();
       Manager.ActiveBrowser.WaitUntilReady();
   }
The above works well at most scenarios except a few in which the above is followed by an assertation  of some kind as 
check if txt exists ext. 
The test passes however when 'executionDelay'  value is increased from 100-150 to 800 or more, indicating the issue is not the code (In a sense that I'm not looking for the wrong element etc). 

Am I using/understanding WaitUntilReady method wrongly ? My assumption is that if WaitUntilReady
is the last action the ClickButtonByGUICaption ()initiates, there should be no issues initiating any kind of verification/action past that point on the page that loads as the page is supposed to be ready. Does ready = fully loaded ?

Pls note that using WaitForElement/Frame maybe quite tedious in my case as I have a large number of situations so I need to use a more generic solution as the above. 

Ta, 
SD. 
 














SD
Top achievements
Rank 1
 answered on 30 Jul 2010
8 answers
94 views
I prefer to study WebAii with snippets and examples ( documentation is really far from comprehensive, but framework is great btw)
Today I found some strange behaviour - I serialized FindParam to file, cause i cant figure what exactly i should write in my Find filters in one special case. I used this code to do serialization
private void filtersSerialization()
{
    var param = new FindParam(FindType.Content, "p:My Solutions Ltd",
    new[] { "onclick=~document.getElementById('cancel_return').value = '1';"});
 
    var paramCol = new FindParamCollection
    {
    { "Sample", param }
    };
 
    paramCol.Save(@"d:\AppParams.xml");
}

And this code created following text
<FindParamItem key="Sample" >
<FindParam TagName="a" XPath="" NodeIndexPath="" Type="Content" ContentType="TextContent"
ContentValue="p:My Solutions Ltd" TagOccurrenceIndex="-1" >
<Attributes />
<PartialAttributes>
<iAttribute Name="onclick" Value="document.getElementById('cancel_return').value = '1';" />
</PartialAttributes>
</FindParam>
</FindParamItem>

But this isnt exactly correct 
onclick should be with screened \'
<iAttribute Name="onclick" Value="document.getElementById(\'cancel_return\').value = \'1\';" />

Otherwise Find.ByParam wont find any element with this filter loaded from file.

I dont sure where exactly this bug belongs to - serialization or regex attribute matching, but this is a wrong behaviour. Save and Load should behave consistently.

UPDATE:
I found exact difference between in-memory creation of FindParam and deserialized from file:

In-memory FindParam have type of partial iAttribute.AttributeType = Event,
and deserialized one have iAttribute.AttributeType = Other.

And BeginQuote\EndQuote different either (None and DoubleQuote).


Any tips how to deserialize param with AttributeType = Event, and quotes set to None?
Direct xml didn't work =(


Missing User
 answered on 29 Jul 2010
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?