Selecting item from RadToolBar element in the Step Builder

4 posts, 0 answers
  1. Alex
    Alex avatar
    5 posts
    Member since:
    Jun 2015

    Posted 03 Sep 2015 Link to this post

    Hi,

    I have added Toolbar element to elements explorer, and i would like to add step to click on specific subitem on this toolbar.

    Am i able to add such step from the step builder using Actions -> Quick steps (or something else)?

    If not, what are the workaround solutions?

    Currently i see that after chanching element type to RadToolBar, only item count verification ability is added to Step Builder -> Verifications.

    No other actions specific to Toolbar element are available in the steps.

     

    Thanks in advance.

  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 04 Sep 2015 Link to this post

    Hello Alex,

    No it is not possible to use the Step Builder to add a click on some random subitem of a toolbar element which has been added to Elements Explorer. It's not possible for Test Studio to figure out how to find the correct subitem element so it can click on it. This must be done by recording a click on the subitem.

    You could also use Element Mapping to add a mock subitem element, but you must still attach the recorder in order for Test Studio to determine and add the correct find logic for the new mock element.

    ...after chanching element type to RadToolBar, only item count verification ability is added...

    Correct. What else did you expect to see?

    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Oleksiy
    Oleksiy avatar
    1 posts
    Member since:
    Mar 2015

    Posted 04 Sep 2015 in reply to Cody Link to this post

    Hi Cody,

    The TTF provides additional functionality for RadElements, different properties and methods. Why some of them are not exposed in TT Studio as Actions?
  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 04 Sep 2015 Link to this post

    Hi Oleksiy,

    Here is everything exposed in TTF for the HTML RadToolBar translator control.

    public class RadToolBar : HtmlContainerControl
    {
        public RadToolBar();
        public RadToolBar(Element element);
     
        public IList<RadToolBarItem> AllItems { get; }
        public override string ClientSideLocator { get; }
        public override IFindExpression LocatorExpression { get; }
        public int Orientation { get; set; }
        public ToolBarOrientationType OrientationType { get; set; }
        public IList<RadToolBarItem> RootItems { get; }
     
        public override void AssignElement(Element e);
        public RadControlAssert ControlAssert();
        public RadToolBarItem FindItem(Predicate<RadToolBarItem> predicate);
        public RadToolBarItem FindItemByText(string itemText);
        public RadToolBarItem FindItemByValue(string itemValue);
        public IList<RadToolBarItem> FindItems(Predicate<RadToolBarItem> predicate);
        public IList<RadToolBarItem> FindItemsByLevel(int level);
    }

    I don't see any methods that would be useful as actions in our step builder.  Is there one in the list above you would like to see exposed as an action? If so, which one and how would you use it?

    I will admit we could expose Orientation and OrientationType for verification. I don't know why it's not already exposed. I've added a feature request here to expose them.


    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top