简体   繁体   English

检测通过模板生成的文本框的问题

[英]Issues detecting textboxes that get generated via a template

I am trying to record UI tests for an Aurelia App. 我正在尝试为Aurelia应用程序记录UI测试。 I am using Telerik Test Studio and it has issues detecting the textboxes that get generated via a template. 我正在使用Telerik Test Studio,它在检测通过模板生成的文本框时遇到问题。

If I use straight HTML in the template eg 如果我在模板中使用直接HTML,例如

<input type="text" name="firstname">

That is easily detected and recorded and playback of the test can enter info into that field 这很容易被检测和记录,并且测试的回放可以将信息输入到该字段中

In a template if I have textboxes resembling 在模板中,如果我有类似的文本框

<textbox name="patientLastName" size="small" editing.bind="editing" if.bind="!demographics.lastName.hidden" required.bind="demographics.lastName.required" label.bind="demographics.lastName.name" value.bind="patient.details.lastName"></textbox>

The template works but I get html resembling 该模板有效,但我得到类似的HTML

<input class="form-control au-target" type="text" value.bind="value" disabled.bind="!editing" au-target-id="143">

This doesn't appear to be outputting any html attributes/properties that Test Studio can latch onto. 这似乎没有输出Test Studio可以锁定的任何html属性/属性。 How would I alter a textbox so that it is detectable by Test Studio? 如何更改文本框以便Test Studio可以检测到它?

Could it be that Telerik Test Studio inspects the page too early and that it cannot find elements that are dynamically added? 难道Telerik Test Studio过早地检查页面并且找不到动态添加的元素? Replace if.bind by show.bind to see if it works. 更换if.bind通过show.bind ,看看它是否工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM