QTP

clicking on particular link using qtp function

丶灬走出姿态 提交于 2019-12-02 20:23:05
问题 I want to automate login process to flipkart by creating a function which is being called in an action Function Website() 'this is the function Systemutil.Run("iexplore.exe"), "http://www.flipkart.com" End Function Website( ) 'this is where the function is called in the action The browser is opening but I don't know how to click on login without doing a record and run , but only through code and the function. Please help me. 回答1: If you want to do it with descriptive programming, this would

clicking on particular link using qtp function

做~自己de王妃 提交于 2019-12-02 13:25:27
I want to automate login process to flipkart by creating a function which is being called in an action Function Website() 'this is the function Systemutil.Run("iexplore.exe"), "http://www.flipkart.com" End Function Website( ) 'this is where the function is called in the action The browser is opening but I don't know how to click on login without doing a record and run , but only through code and the function. Please help me. If you want to do it with descriptive programming, this would be a simple example: (I used the direct login-page, because it is easier than clicking on that login link)

Click on a href link in an already opened browser window

青春壹個敷衍的年華 提交于 2019-12-02 07:36:14
问题 In the below code I'm trying to click on the "About" link ( href ) in the www.google.co.in website. This worked on IE11 (Windows 10), but is not working for IE10 (Windows 7). Is this in anyway machine dependent. If not what is the right code? Please remember I'm trying to click on a link in an already opened browser window. Set objShell = CreateObject("Shell.Application") IE_count = objShell.Windows.Count For x = 0 To (IE_count - 1) On Error Resume Next ' sometimes more web pages are counted

QTP/UFT - Close all browsers except QC/ALM

点点圈 提交于 2019-12-02 07:05:58
Currently I am using the below code to close all the browsers except the ALM browser from where I run the test suite from. However When I run the suite from ALM, the below code identifies 2 browsers - ALM browser and the test case browser. It first closes the test case browser and when it executes the iteration for the ALM browser, it says the browser is not identified when it tries to find the name of the browser. I am not sure why it counts it as a browser if it cant identify it later. Any thoughts on how to resolve this? Dim oBrDes Dim oBrObjList Dim objIndex Set oBrDes=Description.Create

How to import data file for UFT API testing?

半腔热情 提交于 2019-12-02 05:18:39
I am working on a project which requires to dynamically import the test data on run time and run the API test corresponding to the test data. I tried using XMLload which I directly load from the xml request. This seems to be working fine. But like GUI testing, where we import the test data, I want the same for API testing - where I can import a excel from an external source dynamically and give the values to the request. How can I do this? As far as I understand your question, you want to load test data from Excel file. And that is what I have done in my previous project but little differently

Retrieve only numbers and ignore alphabets from String

旧城冷巷雨未停 提交于 2019-12-02 00:36:58
I have strings like 10A or 20B. I want 10 in 10A or 20 in 20B. How to split only numbers from string using VBScript or QTP internal commands? I would use a regular expression: s = "20B" Set re = New RegExp re.Pattern = "^\d+" For Each m In re.Execute(s) num = CInt(m) Next WScript.Echo num 来源: https://stackoverflow.com/questions/39601885/retrieve-only-numbers-and-ignore-alphabets-from-string

Get dates from AUT?

◇◆丶佛笑我妖孽 提交于 2019-12-01 12:41:33
My Web-based application (like most) follows the browser locale to format dates. So if you configure British English as the preferred language in the browser, the app will display dates in " DD/MM/YYYY " format. Now QTP (ok, it´s VBScript that is the culprit) does not know about this. It strictly follows the local machine´s locale settings. Unfortunately, that means that if my local machine is configured to German locale, and the app is in English (because the browser is configured this way), VBScript´s DateValue function will fail (because it expects " DD.MM.YYYY " format. So what is an

How to install the “BHOManager CLASS” add-on in IE

感情迁移 提交于 2019-12-01 10:16:16
问题 This "BHOManager CLASS" add-on is a supporting add-on to run QTP script on the IE browser. The publisher of this add-on is Mercury Interactive Corp. I have uninstalled the existing IE browser because of some issues in my machine and reinstalled it. And after this i cannot run the QTP script as the "BHOmanager Class" add-on is missing. 回答1: Well, the re-install was the easiest option, but let's try this: Can you see the BHOManager class in IE? Go to IE > Tools > Manage Add-ons, make sure

How does UFT perform the Click method when using the Web Add In?

我与影子孤独终老i 提交于 2019-12-01 09:22:25
I am testing a highly javascript based application on Internet Explorer 8.0 with UFT 11.50. I would like to know how UFT implements the "Click" method under the hood when using the Web Add In. Does UFT send a windows mouse event? Does it fire an event (onclick, onmousedown, onmouseup)? I have been seeing some mixed results with my application. It can do either, by default UFT replays using DOM events but you can change the replay type to device in which case it queries the HTML element's location and simulates a mouse click on that location. The replay mode is controlled by Tools->Opitions-

What is descriptive programming (Programmatic Description) in QTP

谁都会走 提交于 2019-12-01 09:12:58
What is descriptive programming in QTP? Creating a test without using the object repository is known as descriptive programming since you describe the objects as part of the script. e.g. Browser("title:=Google").Page("title:=Google").Link("text:=Advanced Search").Click Note the := in the test objects' names, this is not a smiley it means that the property title has value Google (as a regular expression). You can also use the Description object via Description.Create . You can see more details here . descriptive programming is writing qtp scpriting without any object repository Jonas Söderström