Telerik Forums
Testing Framework Forum
1 answer
108 views
I have tried to set global timeout when find element on the page but it doesn't work.

- This is working
HtmlElementContainer.Get<HtmlSpan>(new HtmlFindExpression("TextContent=Test", "tagname=span"), true, 20000);

- This is not working. It time out immediately. Is there something else I need to do?
HtmlElementContainer.Get<HtmlSpan>("TextContent=Test", "tagname=span");
app.config:
<WebAii.Settings
...
...
...
    waitCheckInterval="20000"
  />

Thanks,
Chhuong
Konstantin Petkov
Telerik team
 answered on 08 Sep 2010
2 answers
90 views
I am using a AutoCompleteBox in my Silverlight app but I can't work out how to get the number of options listed by the AutoCompleteBox because I can't cast the control to AutoCompleteBox because it can't be converted to a WebAii FrameworkElement.

Any ideas?  My code looks something like this.  

var autoCompleteBox = app.FindName(testUtil.AutoCompleteBox);
autoCompleteBox.User.TypeText("f", 50);
 
autoCompleteBox.Refresh();
 
var list = (List<String>) autoCompleteBox.As<AutoCompleteBox>().ItemsSource;
 
Assert.That(list.Count, Is.EqualTo(2));
Lim
Top achievements
Rank 1
 answered on 08 Sep 2010
0 answers
124 views
hi All,

I am using WeAii 2.0 framework. I have a scenario where windows logon dialog box appears twice for authentication on accessing test website. First time dialog box is handled  but it reappears again and script fails to handle it again.
Below is the lines of code included in script

Manager.DialogMonitor.AddDialog(

LogonDialog.CreateLogonDialog(ActiveBrowser, <USerNMame>, <passwod>, DialogButton.OK));

 

Manager.DialogMonitor.Start();

 

ActiveBrowser.NavigateTo(

"URL");

Any idea how to resolve this issue.
Suggestion appreciated :)

Thanks in advance 
Regards,
Mahendra

 

Mahendra Kumar
Top achievements
Rank 1
 asked on 08 Sep 2010
8 answers
525 views
I have two drop down boxes: dd1and dd2.  dd2 starts of being disable and has no value.  dd2 is populated dynamically based on values selected in dd1.  dd2 will be enabled once the values are populated.  However when I try to open dd2 after I select a value from dd1 it requires 2 clicks (or a double click) using WebAii.  If I do this manually I only require 1 click.  

So why do I need to double click dd2?

Some things that I've tried:
1/ added a Thread.sleep(1000) before clicking on dd2.  This didn't work.
2/ added MouseHover before I did the click on dd2.  That didn't work either.
3/ used a while loop to check that dd2 was enabled otherwise sleep(1000).  That didn't work.  

var keyComboBox = app.FindName<ComboBox>("dd1");
keyComboBox.User.Click();
keyComboBox.Refresh();
keyComboBox.SelectByText("Sport");
 
var valueComboBox = app.FindName<ComboBox>("dd2");     
valueComboBox.User.Click(MouseClickType.LeftDoubleClick);
valueComboBox.Refresh();
valueComboBox.SelectByText("Football");



Konstantin Petkov
Telerik team
 answered on 08 Sep 2010
3 answers
128 views
When I use HtmlElementContainer.Get<HtmlDiv>(...), it will throw exception if it can't find element in the page for a specified period. Is there any setting to return null if the control is not found? I don't want to catch exception every time I find an element.

Example: this is what I want to do

HtmlDiv divUserName = HtmlElementContainer.Get<HtmlDiv>(new HtmlFindExpression(...), true, 5000);
Assert.IsNotNull(divUserName , "Cannot find username control");

Nikolai
Telerik team
 answered on 03 Sep 2010
1 answer
142 views
Hi, 
I've got the following radio button among other similar radio buttons on the same page: 
<input type="radio" value="green" name="outcome_LO"/>
I came with this query but it's quite expensive and takes a while to execute (That page has 18 radios)..Any suggestion for a more elegant solution ? 
HtmlInputRadioButton rr = (from b in Find.AllControls<HtmlInputRadioButton>() where b.Value.Equals("green") && b.Name.Equals("outcome_LO") select b).First();

rr.Check(
true, true);
Wit
Top achievements
Rank 1
 answered on 02 Sep 2010
1 answer
94 views

Hello Team,

Have you any plan to realize some wrappers for Silverlight components available on the market?

In particular for http://www.componentone.com/SuperProducts/StudioSilverlight/.

I had a look to the custom control thread, but as I am not so familiar with this type of code.

I would like at least be able to manipulate the C1DataGrid using VB.net.

Kind regards.

Konstantin Petkov
Telerik team
 answered on 27 Aug 2010
1 answer
177 views
I can't find anywhere examples for Wait.ForCondition.
I would like my test to wait for input box to contain text longer than 4 characters.
How to do it?
Wit
Top achievements
Rank 1
 answered on 26 Aug 2010
5 answers
168 views
I would like to extend the standard html controls or build completely new, composite controls placed in separate class.
Then, I would like to use them in my test code like:

CustomWebControl myControl = new CustomWebControl();
myControl.TextBox.TypeText("sample");
myControl.Button.Click();

CustomControls should ideally initialize itself from ActiveBrowser bye something like:

TextBox = base.Find.ById("textbox1");


How to do it?
Nikolai
Telerik team
 answered on 26 Aug 2010
9 answers
143 views
What is the plan to support the latest version of Safari?
Konstantin Petkov
Telerik team
 answered on 25 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?