Testing Your Profession Right !
Two benefits of Failure. First it makes us to Learn what does not work and second it gives us the opportunity to try a new approach.
Thursday, 28 January 2016
Sunday, 13 July 2014
How to Retrieve the disappeared Tool bar or Menu Bar in QTP Object Repository or Object Repository Manager ?
1. Open the ORMToolBarLayout.xml file from below path.
File: C:\Documents and
Settings\User\Application Data\HP\QuickTest Professional\ORMToolBarLayout.xml
2. Make the <Visible>false</Visible> tag to true
<Key
id="ref-78">ToolbarStandard</Key>
< Tools href="#ref-79"/>
< Settings href="#ref-80"/>
< DockedColumn>0</DockedColumn>
< DockedPosition>4</DockedPosition>
< DockedRow>0</DockedRow>
< FloatingLocation xsi:type="a2:Point" xmlns:a2="http://schemas.microsoft.com/clr/nsassem/System.Drawing/System.Drawing">
< x>204</x>
< y>154</y>
< /FloatingLocation>
< FloatingSize xsi:type="a2:Size" xmlns:a2="http://schemas.microsoft.com/clr/nsassem/System.Drawing/System.Drawing">
< width>454</width>
< height>22</height>
< /FloatingSize>
< PositionWhenLastDocked>0</PositionWhenLastDocked>
< DockedRowWhenLastDocked>1</DockedRowWhenLastDocked>
< DockedColumnWhenLastDocked>0</DockedColumnWhenLastDocked>
< TargetPositionInDockedRow>73</TargetPositionInDockedRow>
<Visible>false</Visible> to true
< Tools href="#ref-79"/>
< Settings href="#ref-80"/>
< DockedColumn>0</DockedColumn>
< DockedPosition>4</DockedPosition>
< DockedRow>0</DockedRow>
< FloatingLocation xsi:type="a2:Point" xmlns:a2="http://schemas.microsoft.com/clr/nsassem/System.Drawing/System.Drawing">
< x>204</x>
< y>154</y>
< /FloatingLocation>
< FloatingSize xsi:type="a2:Size" xmlns:a2="http://schemas.microsoft.com/clr/nsassem/System.Drawing/System.Drawing">
< width>454</width>
< height>22</height>
< /FloatingSize>
< PositionWhenLastDocked>0</PositionWhenLastDocked>
< DockedRowWhenLastDocked>1</DockedRowWhenLastDocked>
< DockedColumnWhenLastDocked>0</DockedColumnWhenLastDocked>
< TargetPositionInDockedRow>73</TargetPositionInDockedRow>
<Visible>false</Visible> to true
>>Run>>Regedit>>>HK_Current_User>>Software>>Mercury Interactive>>QuickTestProfessional
4. Now Close the QTP and Open The QTP and check the Object Repository.
Thursday, 19 June 2014
Split Function:-The Split function will separates a string into substrings and creates a one-dimensional array where each substring is an element.
Syntax:-
Slit(Expression, Delimiter, Count, Compare(optional))
The Split function separates a string into substrings and creates a one-dimensional array where each substring is an element.
Example: -
mystring = "How is velmuruganqa blogs?"
myarray = Split(mystring," ",2,1) ' here delimiter is space
myarray(0)
myarray(1)
a=myarray(0) 'output is =How
b=myarray(1) 'output is =is
----
Here 2 is nothing but number of count to be occur as array
Slit(Expression, Delimiter, Count, Compare(optional))
The Split function separates a string into substrings and creates a one-dimensional array where each substring is an element.
Example: -
mystring = "How is velmuruganqa blogs?"
myarray = Split(mystring," ",2,1) ' here delimiter is space
myarray(0)
myarray(1)
a=myarray(0) 'output is =How
b=myarray(1) 'output is =is
----
Here 2 is nothing but number of count to be occur as array
Compare VALUE | DESCRIPTION |
0 | Binary comparison |
1 | Text Comparison |
2 | Compare information inside database |
Instr Function:-The InStr function will returns the numeric position of the first occurrence of a specified substring within a specified string when starting from the beginning (left end) of the string
Syntax:-
InStr(Start, String, Substring, Compare(optional))
The InStr function will returns the numeric position of the first occurrence of a specified substring within a specified string when starting from the beginning (left end) of the string. You can have the search for the substring be sensitive to the case (upper versus lower), or not. The default is to be case sensitive (binary comparison).
Example:-
str="Velmurugan"
str1="m"
a=instr(1,str,str1,1)
msgbox a
output:-4
Here Start is nothing but to start search from which position , if start is 1 means it will search from 1st position , if start is 5 means it will search from 5th position of string.
Note:-
InStr(Start, String, Substring, Compare(optional))
The InStr function will returns the numeric position of the first occurrence of a specified substring within a specified string when starting from the beginning (left end) of the string. You can have the search for the substring be sensitive to the case (upper versus lower), or not. The default is to be case sensitive (binary comparison).
Example:-
str="Velmurugan"
str1="m"
a=instr(1,str,str1,1)
msgbox a
output:-4
Here Start is nothing but to start search from which position , if start is 1 means it will search from 1st position , if start is 5 means it will search from 5th position of string.
Note:-
Compare VALUE | DESCRIPTION |
0 | Binary comparison(case sensitive) |
1 | Text Comparison(case insensitive) |
2 | Compare information inside database |
Rnd function:-The Rnd function will generates a pseudo-random number
Syntax:-
Rnd(Number)
The Rnd function will generates a pseudo-random number greater than or equal to 0.0 and less than 1.0.
before using rnd function we have to declare Randomize Function
Example:
Randomize
Rnd()
Output:
0.1414095
Example 2:-
Randomize
upperlimit = 150000.0
lowerlimit = 10000.0
Int((upperlimit - lowerlimit + 1)*Rnd() + lowerlimit)
Output:
13366
Rnd(Number)
The Rnd function will generates a pseudo-random number greater than or equal to 0.0 and less than 1.0.
before using rnd function we have to declare Randomize Function
Example:
Randomize
Rnd()
Output:
0.1414095
Example 2:-
Randomize
upperlimit = 150000.0
lowerlimit = 10000.0
Int((upperlimit - lowerlimit + 1)*Rnd() + lowerlimit)
Output:
13366
Wednesday, 18 June 2014
Now Function:-The Now function will returns the date and time as determined by your computer.
Syntax:-Now
The Now function will returns the date and time as determined by your computer.
Example:-
a=Now
Msgbox a
'OutPut is:-6/19/2014 12:48:32 AM
The Now function will returns the date and time as determined by your computer.
Example:-
a=Now
Msgbox a
'OutPut is:-6/19/2014 12:48:32 AM
CInt(Number) :-Function-->The CInt function will converts any number to the variant of subtype Integer.
Syntax:-CInt(Number)
The CInt function will converts any number to the variant of subtype Integer.
Converts to values ranging from -32,768 to 32,767 The number is rounded off.
Code:
a=1555.567
Cint(a)
Output:
1556
And mostly where we will use . Some time when we get the value from our application, there is the chance to be an variable .
Example recently I get the value from one label ,its look like integer (E.g 8) but its displayed as variable . so in this situation we need to convert it from variable to integer.
Why we need to change it as integer.
if we need to compare the value to any integer surly we need to convert it before as an integer.
The CInt function will converts any number to the variant of subtype Integer.
Converts to values ranging from -32,768 to 32,767 The number is rounded off.
Code:
a=1555.567
Cint(a)
Output:
1556
And mostly where we will use . Some time when we get the value from our application, there is the chance to be an variable .
Example recently I get the value from one label ,its look like integer (E.g 8) but its displayed as variable . so in this situation we need to convert it from variable to integer.
Why we need to change it as integer.
if we need to compare the value to any integer surly we need to convert it before as an integer.
Subscribe to:
Posts (Atom)