使用QTP自动进行日期控制

编程入门 行业动态 更新时间:2024-10-23 04:39:44
本文介绍了使用QTP自动进行日期控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

请帮助我使用QTP自动执行日期控制对象.

Please help me in automating date control object using QTP.

我正在尝试自动执行日期控制,因为它会在运行时选择用户所需的日期(**也可以来自上一年).但是我无法通过使用日期控制对象来实现它,因为该IMAGE对象没有任何内置操作可供选择.

I'm trying to automate date control as it picks the user required date (** can be from previous year too) during run time. But I couldn't achieve it by using the date control object, as that IMAGE object doesn't have any in-built operations to select required.

Note: Textbox is disabled and so we cannot enter the date into it directly, so we should select the required date from the calendar object. Thanks!

2015年3月27日:使用AUT屏幕进行更新以更加清晰

这是我要自动化的日期控件,在此应用程序之前,我只是用来添加文本框控件并在其中设置所需的日期.但是在这种情况下,该文本框不可编辑,因此我们必须从日期控件对象中选择日期-大多数日期(输入)都来自过去几年.

Here is the date control I'm trying to automate, prior to this application, I just used to add the textbox control and SET the required date into it. But in this case, the textbox is not editable, and so we I have to pick the date from the date control object - most the dates (inputs) are from past years.

所以我只是试图捕获控件对象,并且它被识别为IMAGE,使用它不能仅执行点击动作.

So I just tried to capture the control object and it's got recognized as IMAGE, using which I couldn't perform only the click action.

请检查并提供帮助.谢谢!

Please check and help. Thanks!

推荐答案

那么您可以尝试描述性编程.

Well you can try descriptive programming.

定义链接类型的obj,然后使用".childobjects"属性从Web表格中获取日期.

Define obj that is of type link and then use ".childobjects" property to pick up the date from a webtable.

注意:这里我认为日历是一个Web表格,其中的日期是链接.

Note: Here I am considering the calender is a webtable, and dates in it are links.

也请让我知道这是否对您有用,并且是否有其他想法值得欢迎.谢谢!

Please also let me know if this worked for you, and if somebody has any other thoughts most welcome. Thanks!

更多推荐

使用QTP自动进行日期控制

本文发布于:2023-11-08 11:23:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1569234.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:日期   QTP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!