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

Selecting item from RadToolBar element in the Step Builder

3 Answers 49 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 03 Sep 2015, 09:46 AM

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.

3 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 04 Sep 2015, 02:46 PM
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!
0
Oleksiy
Top achievements
Rank 1
answered on 04 Sep 2015, 04:01 PM
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?
0
Cody
Telerik team
answered on 04 Sep 2015, 04:37 PM
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!
Tags
General Discussions
Asked by
Alex
Top achievements
Rank 1
Answers by
Cody
Telerik team
Oleksiy
Top achievements
Rank 1
Share this question
or