Ho I supposed to identify and user some custom controls

8 posts, 0 answers
  1. Mircea-Bogdan
    Mircea-Bogdan avatar
    4 posts
    Member since:
    Sep 2010

    Posted 21 Oct 2010 Link to this post

    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 ?  

  2. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 28 Oct 2010 Link to this post

    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
  3. Mircea-Bogdan
    Mircea-Bogdan avatar
    4 posts
    Member since:
    Sep 2010

    Posted 29 Oct 2010 Link to this post

    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
  4. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 03 Nov 2010 Link to this post

    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
  5. Mircea-Bogdan
    Mircea-Bogdan avatar
    4 posts
    Member since:
    Sep 2010

    Posted 04 Nov 2010 Link to this post

    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
  6. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 08 Nov 2010 Link to this post

    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
  7. Mircea-Bogdan
    Mircea-Bogdan avatar
    4 posts
    Member since:
    Sep 2010

    Posted 09 Nov 2010 Link to this post

    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
  8. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 09 Nov 2010 Link to this post

    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
Back to Top