How to provide Id property to whole control

7 posts, 0 answers
  1. Rajendar
    Rajendar avatar
    69 posts
    Member since:
    Jun 2013

    Posted 13 Nov 2014 Link to this post

    Hi Everyone,

    I am checking test-ability of Kendo UI application with CUIT (Coded UI of Microsoft). Whenever I added Id property it reflecting to edit control not for whole NumericTextBox.

    How can I provide Id property to whole  NumericTextBox Kendo UI control. This behaviour observed on Sample Kendo UI controls. Please see the image



    Regards,
    Rajendar
  2. Rajendar
    Rajendar avatar
    69 posts
    Member since:
    Jun 2013

    Posted 13 Nov 2014 Link to this post

    Attached image file. Same problem is observed with other controls i.e: Notification Control, Scheduler etc
  3. Kendo UI is VS 2017 Ready
  4. Atanas Georgiev
    Admin
    Atanas Georgiev avatar
    126 posts

    Posted 13 Nov 2014 Link to this post

    Hello Rajendar,

    Kendo UI does not generate id-s for DOM elements of Kendo UI controls out of the box. In the “Creating testable UI" section of his article “Functional GUI Testing and Kendo UI” Jim Holmes addresses the most common challenges Kendo UI application testers meet in their every day work. For cases like the one you describe, he recommends practices as locating by ‘class’ and ‘name’ attribute as well as generating id-s of some elements with custom code.

    As we do not officially support Microsoft Coded UI we recommend you to check out Telerik TestStudio – a test automation product with built in Kendo UI translators (more detailed information can be found at: http://www.telerik.com/automated-testing-tools/campaigns/testing-kendoui-apps.aspx). It is possible that TestStudio will help with most of the issues you experience out of the box.

    Regards,
    Atanas Georgiev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  5. Rajendar
    Rajendar avatar
    69 posts
    Member since:
    Jun 2013

    Posted 13 Nov 2014 in reply to Atanas Georgiev Link to this post

    Hi Atanas Georgiev,

    Thanks for quick response.

    In sample application which is provided by Teleik. There are two comboboxs I want perform action on second combobox select icon but it is performing action on first icon (I do not want depend on TagInstance/TagIndex)

    Regards,
    Rajendar.
  6. Atanas Georgiev
    Admin
    Atanas Georgiev avatar
    126 posts

    Posted 14 Nov 2014 Link to this post

    Hello Rajendar,

    Straight up to your question:

    Let me give an example by opening the second ComboBox on the following page:

    http://demos.telerik.com/kendo-ui/combobox/index.  

    This can be achieved by performing “click” action on element with XPath “//input[@placeholder='Select size...']/../span”. We start from the only input with placeholder attribute that equals “Select size…” and create a short relative Xpath pointing to the span that opens the combo. 

    Regards,
    Atanas Georgiev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  7. Rajendar
    Rajendar avatar
    69 posts
    Member since:
    Jun 2013

    Posted 14 Nov 2014 in reply to Atanas Georgiev Link to this post

    Hi Atanas Georgiev,

    Yes but there is no XPath property in CUIT. Can you provide more details about " class  " property for Kendo UI controls. Whenever I add class it reflecting to parent and to child controls. 
    Is this same behavior for other controls ?

    Please see attached image for source code
  8. Atanas Georgiev
    Admin
    Atanas Georgiev avatar
    126 posts

    Posted 17 Nov 2014 Link to this post

    Hi Rajendar,

    Class property does not propagate to parent or child nodes. More info about KendoUI CSS classes can be found on http://docs.telerik.com/kendo-ui/web/appearance-styling.

    We do not officially support Microsoft Coded UI but there is a lot of information available on the web (sample topic from MSDN blog that may be of interest to you

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/6a0d4637-cb5f-45fb-8a27-4e1c43ea39b9/xpath-to-search-controls-coded-ui?forum=vstest).

    Regards,
    Atanas Georgiev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready