[英]Telerik Test Studio - Interacting With Webpage Sliders Outside of Kendo UI
I've been going through Telerik Test Studio's online resources and tutorials, and none of these basic examples seem to cover what I'm having issues with – sliders. 我一直在浏览Telerik Test Studio的在线资源和教程,这些基本示例似乎都没有涵盖我所遇到的问题-滑块。
I'm looking to do some tests on a webpage that has slide bars. 我正在尝试对具有滑动条的网页进行一些测试。 The way that they are implemented is a bit strange, and I so I wanted to ask what the common practice was for working with sliders in Telerik Test Studio.
它们的实现方式有些奇怪,所以我想问一下在Telerik Test Studio中使用滑块的常见做法是什么。 I've experimented with drag and drop, which doesn't seem to work consistently (since the action's start and end location are based on the monitor).
我已经尝试了拖放操作,但似乎无法始终如一地工作(因为动作的开始和结束位置基于监视器)。 There seemed to be potential in regards to the MouseDown + DragTo + Mouse Up actions, but I couldn't seem to get them to work on the interface I was testing either.
关于MouseDown + DragTo + Mouse Up动作似乎很有潜力,但是我似乎也无法使它们在我正在测试的界面上正常工作。 In general, I would love to have some advice on how to interact with sliders outside of the nicely laid out Kendo UI elements.
总的来说,我想就如何与布局合理的Kendo UI元素之外的滑块进行交互提供一些建议。
Thank you in advance for any feedback. 预先感谢您的任何反馈。
In my team we usually use the Kendo JavaScript API and wrap it in controls for example: 在我的团队中,我们通常使用Kendo JavaScript API并将其包装在控件中,例如:
public class KendoColorPicker
{
private readonly string colorPickerSetColorExpression =
"$('#{0}').data('colorpicker').value('#{1}');";
private readonly string idLocator;
public KendoColorPicker(string idLocator)
{
this.idLocator = idLocator;
}
public void SetColor(string hexValue)
{
string scriptToBeExecuted = string.Format(colorPickerSetColorExpression, this.idLocator, hexValue);
Manager.Current.ActiveBrowser.Actions.InvokeScript(scriptToBeExecuted);
}
}
I wrote an article about it- Advanced Web UI Components Automation with Telerik Testing Framework . 我写了一篇关于它的文章- 带有Telerik Testing Framework的高级Web UI组件自动化 。 I think you can use a similar approach.
我认为您可以使用类似的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.