how to retrive that the number of spaces are in a string ????
Answers were Sorted based on User's Feedback
Answer / kamakshya prasad
Dim str
str="QTP, an automation Tool uses for software testing"
s=split(str," ")
msgbox ubound(s)
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / uday
You just split with space, and the ubound of that array +1
is the number of spaces.
| Is This Answer Correct ? | 5 Yes | 4 No |
I am facing an issue of object identification with the dropdown element of DHTML grid. When I tried to recognize these different dropdown objects, QTP identifies only one object for all the dropdowns. Hence, selection of different data from different dropdowns list is an issue. To overcome this problem, i have used Descriptive Programming technique by creating different object descriptions which have all the other properties same but differ only in one property i.e. ‘X’ location of the element on the screen. Hence, i have created distinct object descriptions that would allow us to select values in different dropdowns. The code is given below. But still I am unable to identify distinct dropdown objects. ‘Object Description for Dropdown Cell Status Set objCellStatus = Description.Create objCellStatus("micclass").value = "WebList" objCellStatus("name").value = "select" objCellStatus("x").value = 219 ------ ‘X’ Axis value for cell status drop down ‘Object Description for Dropdown Sub Segment Set objSubSegment = Description.Create objSubSegment("micclass").value = "WebList" objSubSegment("name").value = "select" objSubSegment("x").value = "319" ------ ‘X’ Axis value for sub segment drop down Please help... This is specific to DTML grid(Drop down object)
What is SQL injection?
Hi Everybody, Can anybody please tell me the how to display the result of the QTP in the notepad text file rather than in the QTP result window. Suppose this is my simple script:WHich will open the notepad file and enter some text and then will change the font then will calculate how much time has been taken.Now, in this script i want to display the result in notepad file. Dim s Dim starttimer,endtimer,timeit s="uyetuywqtywqte" SystemUtil.Run "notepad","","Y:\","" Window("Notepad").WinEditor("Edit").Type micCtrlDwn + "s" + micCtrlUp Window("Notepad").Dialog("Save As").WinEdit("File name:").Set "test1" Window("Notepad").Dialog("Save As").WinEdit("File name:").Type micReturn Window("Notepad_3").Type s Window("Notepad_3").WinEditor("Edit").Type micCtrlDwn + "s" + micCtrlUp starttimer=timer Window("Notepad_3").WinMenu("Menu").Select "Format;Font..." Window("Notepad_3").Dialog("Font").WinEdit ("Font:").Type "cou" + micDwn Window("Notepad_3").Dialog("Font").WinComboBox ("Font:").Select "Courier" Window("Notepad_3").Dialog("Font").WinEdit ("Font:").Set "Courier" Window("Notepad_3").Dialog("Font").WinEdit("Font:").Type micReturn endtimer=timer timeit=endtimer-starttimer print(timeit) Please also tell me where the function for the text file result will be declared and where it should be called. Thanks, Gaytri
How to Synchronize the Browser at Field level? For example if you put Browser.sync(), its waiting upto for that Browser sync only. It should wait total Browser get upload with fields.
tell me about regular expressions in QTP? where we use? give eample?
what is the difference between call to copy action and call to an existing action
How to Compare the 2 xl-sheets in QTP? ple write the vb Script for the comparison?
How QTP recognizes Objects in AUT?
How do you do batch testing in wr and is it possible to do in qtp, if so explain?
What are the Features & Benefits of Quick Test Pro ?
What are the ways you can synchronize?
Can I compare two DataBases using QTP ?