Find Interview Questions for Top Companies
Ques:- We have an application which is built using multiple technologies and are using QTP as the tool for Automating the same. While we spy over a combo box in this application, we get the object name as a “Combo Control” and we are not able to perform any action over this object in either selecting or checking any method for the same like “Exist” etc. Hence we thought of a solution and the same can be found below
Asked In :-
Ques:- when you use For Loop, While..do, do..while? at what situations which loop will use.
Asked In :- alx,
Right Answer:
Use a **For Loop** when you know the number of iterations in advance. Use **While..Do** when you want to continue looping as long as a condition is true, and you may not know how many times it will run. Use **Do..While** when you want to ensure the loop runs at least once before checking the condition.
Comments
Admin May 17, 2020

"For" loop can be used when the range of the iteration is
known. For ex: For i = 1 to 100....
"While..do" or "do..While" can be used when, the scenario
should satisfy the condition.
For Ex: While (<Condition>)...

Ques:- How to return a value from function…? you should not tell msgbox, print.. etc.,
Asked In :-
Comments
Admin May 17, 2020

Dim StrFunVal
StrFunVal = fn_MyFunction(7)
Function fn_MyFunction(Num)
fn_MyFunction=Num+8
End Function
During the execution the "StrFunVal" variable will contain
the value 15. If you don't want to use 'Msgbox' or 'Print'
then declaring a variable is prefered.
For your other question I haven't come across returning
more than 1 value from functions. Probably we have to use a
ARRAY kind of stuff...but not sure. Need to work on it.
Cheers,
VGR

Admin May 17, 2020

in VB Script

Ques:- a function that takes an integer array as an argument and returns the largest value in the array. Use the function in a program
Asked In :-
Right Answer:
```vbscript
Function FindLargestValue(arr)
Dim largest, i
largest = arr(0)
For i = 1 To UBound(arr)
If arr(i) > largest Then
largest = arr(i)
End If
Next
FindLargestValue = largest
End Function

' Example usage
Dim numbers
numbers = Array(3, 5, 7, 2, 8)
Dim largestValue
largestValue = FindLargestValue(numbers)
WScript.Echo "The largest value is: " & largestValue
```
Comments
Admin May 17, 2020

<?php
// define function largest()
function largest($numbers) {
foreach ($numbers as $temp) {
$largestNumber = max($numbers);
}
return $largestNumber;
} // end function
$numbers = array(3, 45, 2, 56, 7, 9, 78, 23, 63);
echo largest($numbers); // if you want you can echo or just
use it another function or programe
?>

Ques:- what is used of Property……..End Property loop ? how to write the script for it?
Asked In :-
Ques:- How to create pull down menu box using vb script
Asked In :-
Right Answer:
To create a pull-down menu (drop-down list) in VBScript, you typically use HTML with a `<select>` element. Here's an example:

```html
<!DOCTYPE html>
<html>
<head>
<title>Pull Down Menu Example</title>
</head>
<body>
<form>
<label for="menu">Choose an option:</label>
<select id="menu" name="menu">
<option value="option1">Option 1</option>
<option value="option2">Option 2</option>
<option value="option3">Option 3</option>
</select>
</form>
</body>
</html>
```

In this example, the `<select>` element creates a pull-down menu with three options.
Ques:- How to insert snapshot during manual scripting in QTP?
Asked In :-
Right Answer:
To insert a snapshot during manual scripting in QTP (QuickTest Professional), you can use the "Insert" menu option. Click on "Insert" and then select "Bitmap" to add a snapshot of the current screen to your test. Alternatively, you can use the keyboard shortcut "Ctrl + B" to quickly insert a bitmap snapshot.
Comments
Admin May 17, 2020

We can use capturebitmap for this two inputs are there one is filetype means need to give path and type of image like png or bmp ("Ex:Login.png") and rest is true or false. true means if image is there with same name it will overwrite if not it creates the name which we have given..By default true is there.
Browser().page().capturebitmap("G:Login.png",true)

Ques:- The function template cocept is implemented in vb.net is ???
Asked In :-
Right Answer:
The function template concept in VB.NET is implemented using **Generics**.
Ques:- Plzzzzzzz can any one tell me which is the best institute in hyderabad for learing VBScript. plz do answer guys its urgent plzzzzzzz. thanks in advance.
Asked In :-
Ques:- 1) How can we use VB script in testing the application? 2) What all are the things(Software application to be installed in PC) we need to learn VBscript?
Asked In :-
Right Answer:
1) VBScript can be used in testing applications by automating tasks such as UI interactions, data validation, and running test cases in tools like QTP (QuickTest Professional) or UFT (Unified Functional Testing).

2) To learn VBScript, you need to have a PC with a text editor (like Notepad), a web browser (for testing scripts in HTML), and optionally, testing tools like QTP/UFT or any other automation framework that supports VBScript.
Ques:- VBscript for QTP,best tutorial?
Asked In :-
Right Answer:
A good tutorial for learning VBScript for QTP (QuickTest Professional) is the official Micro Focus UFT (Unified Functional Testing) documentation, as well as online resources like the "VBScript Tutorial" on W3Schools and the "VBScript for QTP" section on Guru99.
Comments
Admin May 17, 2020

for VBScript in QTP orientation visit:
www.gcreddy.com
there you can get:
VBScript examples,
GUI Scripts,
Web Scripts,
Database scripts,
Excel scripts,
Flat files scripts etc..
It is a very useful site for QTP advanced learners.

Ques:- plz give ans to this in vb script…….. “krishna radha” i want to print this string “Radha Krishna” like this
Asked In :-
Comments
Admin May 17, 2020

str="krishna radha"
a=left(str,7)
c=Replace(a,"k","K")
b=right(str,5)
d=Replace(b,"r","R")
msgbox d&" "&c

Admin May 17, 2020

str="krishna radha"
A=Split(str," ")
Fstring=A(0)
Lstring=A(1)
sLString=replace(Lstring,"r","R")
sFString=replace(Fstring,"k","K")
Rstring=sLString&" "&sFString
MsgBox Rstring
The above VB Script is exact ans for this question.

Ques:- hai all.iam chandu..please let me know how to test a link in QTP when it is changing at run time..and what property we should take while we r using descriptive programming for a link..
Asked In :-
Comments
Admin May 17, 2020

U can get the value by using Object Spy and get the properties
which ever u want.

Admin May 17, 2020

we can test the frequently changed object like links or
buttons...etc with the help of DP...
we can test dynamicly changed links with help of DP with
Reg.Exp or creation of time.
Set link = Description.Create()
link("innertext").Value = "xxx"
link("innertext").Reg.Exp = "xxx"
Browser(Broswer).page(Page).weblink(link).click

Ques:- How to write a general script which should does the following a). If a page object is given, it should identify the page object of the corresponding page(site). b). It should identify all the links of that particular page. in QTP tool?
Asked In :-
Comments
Admin May 17, 2020

if page object is given then..
eg> set pgObj = browser(yahoo).page(yahoo)
pgObj - is the page object
Answers:
1. we can check for the page as follows
tmpPageName = pgObj.getroproperty("name")
if tmpPageName = "Yahoo" then
msgbox "Found the page"
else
msgbox "Page Not found"
end if
2. Need to use description.create function
set descObj = description.create
descObj("micclass").value ="link"
set lnkObj = pgObj.childobjects(descObj)
msgbox lnkObj.count '// This will give you number of links
found in that page

Admin May 17, 2020

I dont know the rite answer for this question,. But this
question will be very much useful to know more about the
main testing tool QTP,.

Ques:- what is the use of Data base check point ?
Asked In :-
Comments
Admin May 17, 2020

it means the impact of front end operations on the backend
tables that is the data validation and the data integrity
(i.e the opetations like inserting, and updating and
deleting whatever the operations that should affect in the
backend tables)

Admin May 17, 2020

A database checkpoint checks the contents of databases
accessed by your web site

Ques:- Hellow friends, I am learning QTP,but here problem is VB script. please guide me how to learn VB script w.r.t QTP and if you know any books tell me or if you have any materials or any use full material or any else w.r.t QTP please post me p.p.sekhar
Asked In :-
Ques:- Hello All, In QTP 9.2 for Mozilla Firefox, there is webelement in my application, I tried to click on that using decsriptive programming, but it does not work. and for this i tried this code too: Set obj = CreateObject (“Mercury.DeviceReplay”) absx = Browser(“”).Page(“”).WebElement(“.”).GetROProperty (“abs_x”) absy = Browser(“”).Page(“”).WebElement(“.”).GetROProperty (“abs_y”) obj.MouseMove absx, absy obj.MouseClick absx, absy, 0 But it is not clicked. Can anyone help me out for this problem. Thnx in Advance
Asked In :-
Comments
Admin May 17, 2020

I am having the same problem. I tried with the above code
and also put wait() statement in the code. Nothing works.
It would be greatly appreciated, if someone help with this.

Ques:- How to identify column in VSFlexgrid? My VSFlexgrid window is identified as ‘Active X Control’
Asked In :-
Ques:- We have 1 web page with names column. I am giving the Service Providers1,2,3…. @ that time dynamically some no of names are displaying in the webpage and The Pop up windows are opening(No.of Pop Up windows=No.of Names). The names may be diffar for each and every Service Provders (Dynamically) How can we handle the Dynamic values?
Asked In :- Skyworks Solutions,
Ques:- What is the difference between ByRef and ByVal. When to use ByRef and ByVal
Asked In :-
Comments
Admin May 17, 2020

ByRef refers to the location, ByVal refers to the actual value. Also, if you are passing parameters with "ByVal" then even if the parameter values are changed, the original argument values will remain intact. But if you pass using "ByRef" then if the parameter values are changed, then the original argument value is also modified

Admin May 17, 2020

Byval refers to the actual value of the variable. ByRef
refers to the location of where the value is stored.
Passing.



The VBScript category on takluu.com is designed for IT professionals and developers who want to strengthen their skills in Visual Basic Scripting Edition (VBScript). VBScript is a lightweight scripting language primarily used for automation, web development, and administrative tasks in Windows environments.

This section covers essential topics such as VBScript syntax, variables, data types, control structures (loops and conditionals), functions, error handling, and interaction with the Windows operating system. You will also find questions on file handling, working with objects, and automating routine tasks using VBScript.

Interviewers often focus on practical scripting skills, asking questions like:

  • “How do you write a loop in VBScript?”

  • “Explain error handling in VBScript.”

  • “How can VBScript be used to automate system tasks?”

Our content explains VBScript concepts clearly, providing examples and scripts that make it easier to understand and apply. Whether you are preparing for an automation role or a developer position, this category helps you build confidence and master VBScript fundamentals.

At Takluu, we regularly update the VBScript category with new questions, coding examples, and best practices, keeping you prepared for scripting-related interviews and tasks.

AmbitionBox Logo

What makes Takluu valuable for interview preparation?

1 Lakh+
Companies
6 Lakh+
Interview Questions
50K+
Job Profiles
20K+
Users