ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
How to find local host name using QTP?
 Question Submitted By :: Padmasekharpediredla
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How to find local host name using QTP?
Answer
# 1
'Record the opening of command prompt in low level mode.
SystemUtil.Run "cmd","","C:\Documents and 
Settings\<user>",""
wait 5
Record entering the text "hostname" in cmd prompt in Analog 
mode .
Desktop.RunAnalog "Track2" 
I have just started learning QTP. I am finding a proper 
script to do the above task without recording in analog. If 
anyone know please post the answers. Thx.
 
Is This Answer Correct ?    1 Yes 1 No
Aiswaryan
 
  Re: How to find local host name using QTP?
Answer
# 2
LHN=Environment.value("LocalHostName")
msgbox LHN

Run it, you will get you local host name.
 
Is This Answer Correct ?    6 Yes 0 No
Arunsingh
 
 
 
  Re: How to find local host name using QTP?
Answer
# 3
Thanks Arun.
msgbox (environment("LocalHostName"))
this will also return the same. since these (LocalHostName, 
OS etc) are built in environment variables, we can get the 
values thro above syntax.
 
Is This Answer Correct ?    0 Yes 0 No
Aiswaryan
 
  Re: How to find local host name using QTP?
Answer
# 4
if you like to hardcode its value, find here

control panel -> system -> general 

Read the second line under Registered to:
 
Is This Answer Correct ?    0 Yes 1 No
Ravi
 
  Re: How to find local host name using QTP?
Answer
# 5
The above code is giving error at for loop
Dim fso,notepad
set fso = createobject("scripting.filesystemobject")

file_path = "c:\nandu.txt"
'forwriting =2
'forreading = 1
set notepad = fso.createtextfile(file_path,1)
notepad.writeline "this is created by Nanda"
notepad.writeline"this is created on "
 
set notepad = fso.opentextfile(file_path,1)
Do
	n = notepad.readline
	msgbox n

Loop until ( notepad.atendofstream=true)

This will work fine.

Thank you
Sailaja
 
Is This Answer Correct ?    0 Yes 3 No
Sailaja
 
  Re: How to find local host name using QTP?
Answer
# 6
sorry this not the answer for this question . sorry.act I 
want to post the ans for to open a notepad and write and 
read contents of the notepad.once again sorry for 
inconvience.

Thank You
Sailaja.
 
Is This Answer Correct ?    1 Yes 0 No
Sandeep
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
how can you write a script without using GUI in QTP? Ordain-Solutions3
For example one window is there the window contain some of Check boxes but my question is how many check boxes are there particular window? Please solve the problem gi_raju@rediffmail.com ippaliraju@yahoo.co.in  3
hi all need one help . i want scroll down and up but thing the holl page is taking webtable. i need to scroll down and up using scroll tab any bodu knows plz help its urjent regards balaji  5
what are the different data driven types?  6
What is the maximum size of Object Repository in QTP 8.2? Mphasis4
can we run the scripts of qtp 8.2 in the qtp7.0?  1
w is active screen Wipro2
How can i check all the button that are enabled in a widnows based application ? What script should i write for this ?  1
what happen in object repository(shared)if we call an existing action from an external action ? and what happen in object repository(peraction)if we call an existing action from an external action ? Covansys2
How Does Run time data (Parameterization) is handled in QTP? IBM2
How to create Userdefined Function.Please write the steps ans also provide example where exatcly we use it. HP1
What are the QTP advantages and disadvantages?  4
What is diff between SDLC AND STLC? Nokia1
Can we do Load Teting with QTP?  10
can we change the name of a check point? when will you start writing testcases? do you follow any methodology for writing test scripts? qtp is key word driven testing or data driven testing?  2
PLZ EXPLAIN HOW TO LAUNCHING QTP IN TEST DIRECTOR? Is it possible or not? If No Why we r using qtp Td Combination? plz explain briefly? What is the purpose of TD With QTP? Wipro1
how to get the object property Covansys4
What is the Major difference between QTP ; LoadRunner? If u want to test an 1. erp module which automation tool you would prefer and why? and 2. for web application, which tool and why? Satyam2
How do we run a test from the 3rd row of the datatable in QTP? Leaving the first two rows we need to test AUT from 3rd row to n'th row. Virtusa3
Difference between image checkpoint and bitmap checkpoint  2
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com