简体   繁体   English

Telerik Test Studio-与Kendo UI外部的网页滑块交互

[英]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.

相关问题 在Telerik Test Studio中测试Alt键 - Test Alt key in Telerik Test Studio 从行中获取元素(Telerik Test Studio) - Get elements from row (Telerik Test Studio) 如何单元测试Visual Studio AddIn与VS DOM交互 - How to Unit Test Visual Studio AddIn interacting with VS DOM Kendo UI MVVM UI自动化测试如何做? - How to do Kendo UI MVVM UI automation test? 在Visual Studio Proffesional 2015中看不到编码的UI测试文件 - Unable to see coded UI test file in Visual Studio Proffesional 2015 Android Studio 2.3在UI中没有Test Instrumentation说明符 - Android Studio 2.3 doesn't have Test Instrumentation specifier in UI Visual Studio 2013编码的UI,测试实验室,远程测试,测试代理配置 - Visual Studio 2013 Coded UI, Test Lab, remote testing, Test agent configuration 是否可以将Visual Studio编码的UI测试部署到Azure或EC2作为测试代理? - Is it possible to deploy Visual Studio Coded UI Tests to Azure or EC2 as Test Agents? 如何在设备上跟踪 Flutter UI Android Studio 测试执行? - How can I follow Flutter UI Android Studio test execution on device? 如何在Visual Studio中将编程文本注入到我的编码UI测试中(而不是录制的文本)? - How to I inject programmatic text into my Coded UI test (as opposed to recorded text) in Visual Studio?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM