[英]UFT click an element based on a given property value
I'm working with a date selector, and I'm trying for my UFT script to pick an appointment date 3 days from today's date.我正在使用日期选择器,我正在尝试让我的 UFT 脚本选择从今天开始 3 天后的约会日期。 I have set up that value specifically to match the property value format in the HTML code:
我已经专门设置了该值以匹配 HTML 代码中的属性值格式:
My question is: How can I instruct UFT to look for a property value by matching whatever is in the "aria-label" property with the value that I have defined in my data.table?我的问题是:如何指示 UFT 通过将“aria-label”属性中的任何内容与我在 data.table 中定义的值进行匹配来查找属性值?
Also, I noticed that the 'Tab index' is -1, not sure if that has anything to do Much appreciated另外,我注意到'Tab index'是-1,不确定这是否有什么关系非常感谢
I have the following code, but UFT does not recognize it "strAppointmentDate" is the cell in the data.table where I defined the desired date:我有以下代码,但 UFT 无法识别“strAppointmentDate”是 data.table 中我定义所需日期的单元格:
iDate= strAppointmentDate Set dd = Browser("Browser").Page("Select Appointment").WebButton("aria-label:=" &iDate, "html tag:=td", "index:=-1") iDate= strAppointmentDate Set dd = Browser("浏览器").Page("选择约会").WebButton("aria-label:=" &iDate, "html tag:=td", "index:=-1")
Instead of "aria-label"
try "attribute/aria-label"
.而不是
"aria-label"
尝试"attribute/aria-label"
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.