Skip to main content

QTP Functions

QTP Functions
**********************************************************************************
Function TimeStamp()
iArr1=Replace(Now,"/","")
iArr2=Replace(iArr1,":","")
iArr3=Replace( iArr2,"AM","")
iArr3=Replace( iArr2,"PM","")
iArr4=Replace(iArr3," ","")
iArr5=Cdbl(iArr4)
iTimeStamp=iArr5-1000000000
TimeStamp=iTimeStamp
End Function
**********************************************************************************
Function TimeStamp(theDate)
TimeStamp=DateDiff("s","01/01/1970 00:00:00",theDate)
End function
**********************************************************************************
How to use the below function in your Test Script
**********************************************************************************
Set oObj=Browser("oBrowser").Page("oPage").Frame("oFrame").WebTable("oWebTable")
Call app_CLA__ClickLink_ChildObject(oObj,1)
**********************************************************************************
Function ClickLink_ChildObject(oObj,iLinkIndex)
Set oDesc1=Description.Create()
oDesc1("innertext").value=oFrame
Set oDesc2=Description.Create()
oDesc2("micclass").value=oWebTable
Set oDesc3=Description.Create()
oDesc3("micclass").value="Link"
oDesc3("index").value=iLinkIndex
Set iLink=oObj.ChildObjects(oDesc1)
iLink(iLinkIndex).click
End Function
**********************************************************************************

Comments

Popular posts from this blog

Revolutionize software testing with AI! 🤖💻 Share your thoughts on ethical implications in the comments.

  As technology evolves, so too does the field of software testing. One exciting development in recent years is the use of AI (Artificial Intelligence) to automate repetitive tasks and improve testing accuracy. Through analyzing large amounts of data and identifying patterns, AI can help identify potential defects or vulnerabilities in software. AI-powered tools can also generate test cases and scenarios by simulating user behavior and input, allowing for more efficient and effective testing. In addition, machine learning algorithms can analyze and learn from past testing data, leading to better predictions and more streamlined testing. AI-powered tools can also help identify and prioritize critical bugs and defects, saving valuable time and effort in manual testing. But it's important to note that AI-powered testing is not a replacement for human testers. While AI can automate certain tasks and help identify potential issues, it's still necessary for human testers to provide a

Is AI taking over your job in software development and testing? 😱"

Are you a software developer or tester feeling threatened by the rise of AI in your industry? 😰 You're not alone. Many professionals in the field are concerned about the potential consequences of AI's integration into software development and testing. While some experts believe that AI can bring significant benefits to the industry, others worry that it could replace human expertise altogether. 🤔 AI algorithms can analyze massive amounts of data and automate many tasks, but they cannot replace the critical thinking and creativity of human beings. Additionally, there are ethical concerns associated with the use of AI in software development and testing. So, what can you do to ensure that you're not replaced by AI in your job? 💪 First, it's essential to recognize that AI is not a replacement for human expertise but rather a tool to augment it. Therefore, it's essential to learn how to work with AI-powered systems to increase your efficiency and productivity. Additi

Make use of free tech stuff, ebook and tutorial at Makeuseof.com

I came across a great website which is one of the leading tech news and advice website. The site offers easy to use tips, tricks, and techniques to make maximum use of your devices – a PC, a laptop, mobile, or a tablet. The site has a section of Free Stuff, which provides you following free items.  1. Free Ebooks 2. Giveaways 3. Tops Lists 4. Free Cheatsheet The videos sections list videos on hardware reviews and tips & tricks. The videos are worth watching. My favorite video is “10 eBay SCAMS You Should Know About!” under the Tips and Tricks section. I hope you will find the site helpful for your tech need and any useful tips to make your life easy.  I got a deal on The Complete 2020 CompTIA Certification Training Bundle at just 60$ instead of the original price of 3,486$. If you want to start a career in Cybersecurity, you can also avail the above offer at https://stacksocial.com/sales/comptia-linux-bundle?aid=a-rmfxc9l6