This is a migrated thread and some comments may be shown as answers.

Ho I supposed to identify and user some custom controls

7 Answers 70 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mircea-Bogdan
Top achievements
Rank 1
Mircea-Bogdan asked on 21 Oct 2010, 01:38 PM

Hi,


Two weeks ago I started to use WebAii for Silverlight Automation testing. This application is developed in SL 4 and it contains even some custom controls (ie. masek text boxes). Until now I didn't find a solution to identify and type and value in them. Those controls are not derived from text box controls , are delivered directly from controls lib so:

I identified them in this way:

  • Control textBox = app.FindName<Control>("textBoxName");

 I tried to fill them in different ways without any result: 

  • textBox.User.TypeText("1234as", 500, true);
  • textBox.SetProperty(new AutomationProperty("Text", typeof(string)), "1234as");


The problems is that the masked text boxes are still empty even if the property was set correctly (I verified)

I used the second statement: "textBox.SetProperty ..." for a normal text box and it has been filled normally.

Could you please help me to solve this issue ?  

7 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 28 Oct 2010, 09:31 PM
Hello Mircea-Bogdan,

All elements in a Silverlight application are FrameworkElement's. Try code like this:

FrameworkElement elem = app.Find.ByExpression(new XamlFindExpression("Name=textBoxName"));
elem.User.TypeText("Lorem ipsum dolor sit amet, consectetuer adipiscing elit.", 20);

Greetings,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mircea-Bogdan
Top achievements
Rank 1
answered on 29 Oct 2010, 02:33 PM
Hi Cody,

Thank you very much for your answer.

I tried to implement your solution but still the masked text box remains empty. A horizontal line appears for a while in the bottom of the field, when “the unit test” tries to fill the masked textbox. After that the line disappears and the field remains empty L

Do you have another idea for this issue ?

Thank very much in advice :) and have a nice weekend

Best regards,
Mircea-Bogdan Sicoe
0
Cody
Telerik team
answered on 04 Nov 2010, 02:22 AM
Hello Mircea-Bogdan,

I apologize for the delay getting back to you. The volume of technical support requests has been overwhelming lately.

I am unable to repro this problem using our masked text box located on our demo page. Can you point me to a website I can access to see and study this problem? Or can we look at this together in a GoToMeeting?

Kind regards,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mircea-Bogdan
Top achievements
Rank 1
answered on 04 Nov 2010, 02:33 PM
Hi Cody,

I'm not able to give you a link to the website which I'm testing. Those masked text boxes which I'm testing are created by Syncfusion.

Below I put you a link with some masked textboxes created by Syncfusion
http://samples.syncfusion.com/sfmvcsamplebrowser/8.3.0.21/MVC/Tools_MVC/Samples/4.0/commoneditor/maskedtextbox

I hope that you will be able to reproduce my problem with those text boxes

Best regards,
Mircea-Bogdan Sicoe
0
Cody
Telerik team
answered on 09 Nov 2010, 12:35 AM
Hi Mircea-Bogdan,

I am still unable to reproduce any problems. I have attached a video showing it playing on my machine, along with the test and data file I used. Would you like to look at this together via GoToMeeting?

Best wishes,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mircea-Bogdan
Top achievements
Rank 1
answered on 09 Nov 2010, 08:21 AM
Hi Cody,

Thank you very much for your answer and video. 
Right now I'm a bit busy with other things but within a few days I will back to the automation tests. I will come back to you after I return to the automation tests.

Thank very much and have a nice week

Best regards,
Mircea-Bogdan Sicoe
0
Cody
Telerik team
answered on 09 Nov 2010, 02:16 PM
Hello Mircea-Bogdan,

No problem. We'll be here when you are ready to pick this back up.

Regards,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Mircea-Bogdan
Top achievements
Rank 1
Answers by
Cody
Telerik team
Mircea-Bogdan
Top achievements
Rank 1
Share this question
or