简体   繁体   English

QTP或UFT VBScript

[英]QTP or UFT VBScript

Could someone kindly please help us to this concern that we are having 请有人帮助我们解决这个问题

We are using Adobe Acrobat DC 2015 Release 我们正在使用Adobe Acrobat DC 2015 Release

We have a website if a user clicks a link it download a pdf file to the Downloads folder section in our computer. 我们有一个网站,如果用户点击它下载pdf文件的链接到我们计算机的下载文件夹部分。 Now we need a function or some code that we can implement in QTP or UFT that shall be able to read the pdf file from the Downloads folder and look for the word "User" and then print to the screen "Text Found" however we do not want to count the number of times the word "User" is in the pdf only to check if the word "User" is present in the pdf. 现在我们需要一个函数或一些代码,我们可以在QTP或UFT中实现,它们能够从Downloads文件夹中读取pdf文件并查找单词“User”,然后打印到“Text Found”屏幕但是我们这样做不想计算“用户”这个词在pdf中的次数,只是为了检查pdf中是否有“用户”这个词。 It would be good if the code can pick up the latest pdf based off the timestamp in the folder so that the most recent pdf is selected. 如果代码可以根据文件夹中的时间戳获取最新的pdf以便选择最新的pdf,那将是很好的。 The reason we want to do this is because we don't want to specify in the code exactly the pdf file name because that shall be dynamically generated 我们想要这样做的原因是因为我们不希望在代码中准确指定pdf文件名,因为它应该是动态生成的

Thanks 谢谢

Regarding finding specific text in a PDF file, checkout UFT's file content checkpoint . 关于在PDF文件中查找特定文本,请检查UFT的文件内容检查点

Regarding finding the latest PDF file, checkout this answer . 关于查找最新的PDF文件,请查看此答案

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

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