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                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
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
please clarify the question .................
i know how to open the notepad file ?
but i don't know how to enter the data into opened notepad ?

Ex: set a=createobject("wscript.shell")
a.run "Notepad.exe"

please give the replay.
my mail id is raju.ippali@gmial.com, 9823257761
 Question Submitted By :: Gi_raju
I also faced this Question!!     Rank Answer Posted By  
 
  Re: please clarify the question ................. i know how to open the notepad file ? but i don't know how to enter the data into opened notepad ? Ex: set a=createobject("wscript.shell") a.run "Notepad.exe" please give the replay. my mail id is raju.ippali@gmial.com, 9823257761
Answer
# 1
set fso=createobject("scripting.filesystmeobject")
set fptr=opentextfile("c:\sample.txt",2,true)
fptr.writeline("this is sample program")
set fptr=nothing


in this 2 for write mode and true for if file doesn't 
exist, it can create a new file sample.txt, if we give 
false, it can open the file sample.txt which is already 
exists.
 
Is This Answer Correct ?    0 Yes 1 No
Kamal
 
  Re: please clarify the question ................. i know how to open the notepad file ? but i don't know how to enter the data into opened notepad ? Ex: set a=createobject("wscript.shell") a.run "Notepad.exe" please give the replay. my mail id is raju.ippali@gmial.com, 9823257761
Answer
# 2
the above answer is not correct
 
Is This Answer Correct ?    1 Yes 0 No
Xxx
 
 
 
  Re: please clarify the question ................. i know how to open the notepad file ? but i don't know how to enter the data into opened notepad ? Ex: set a=createobject("wscript.shell") a.run "Notepad.exe" please give the replay. my mail id is raju.ippali@gmial.com, 9823257761
Answer
# 3
sline="Hello"
Set fso = CreateObject("Scripting.FileSystemObject") 
Set CreateFile = fso.CreateTextFile("c:\x1.txt",True)
CreateFile.close
Set OpenFile = fso.OpenTextFile("c:\x1.txt",8,True)
OpenFile.Writeline sline
OpenFile.Close
 
Is This Answer Correct ?    0 Yes 0 No
Arun
 
  Re: please clarify the question ................. i know how to open the notepad file ? but i don't know how to enter the data into opened notepad ? Ex: set a=createobject("wscript.shell") a.run "Notepad.exe" please give the replay. my mail id is raju.ippali@gmial.com, 9823257761
Answer
# 4
I thik This Code will Work

set a=createobject("wscript.shell")
a.run "Notepad.exe"
Set Obj = Window("regexpwndtitle:=  Notepad").WinEditor
("nativeclass:= Edit")
Obj.Click
a.Sendkeys "I Love QTP"
 
Is This Answer Correct ?    0 Yes 0 No
Vibhav Srivastav
 
  Re: please clarify the question ................. i know how to open the notepad file ? but i don't know how to enter the data into opened notepad ? Ex: set a=createobject("wscript.shell") a.run "Notepad.exe" please give the replay. my mail id is raju.ippali@gmial.com, 9823257761
Answer
# 5
Dim a,b
Set a= CreateObject("Scripting.FileSystemObject")
Set b= a.CreateTextFile("c:\Test.txt")
b.Writeline("Hi Welcome To QTP")
 
Is This Answer Correct ?    0 Yes 0 No
Sri Satya
 
  Re: please clarify the question ................. i know how to open the notepad file ? but i don't know how to enter the data into opened notepad ? Ex: set a=createobject("wscript.shell") a.run "Notepad.exe" please give the replay. my mail id is raju.ippali@gmial.com, 9823257761
Answer
# 6
Dim fso,filepath
Set fso =CreateObject("Scripting.FileSystemObject")
Set filePath =fso.CreateTextFile("C:\mpatil3.txt")
filePath.WriteLine ("This is sample code")
filepath.Close
Set fso  =Nothing

I have tested this and it works fine.
 
Is This Answer Correct ?    0 Yes 0 No
M.s.patil
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
HOW DO U CALL A ACTION IN QTP? BirlaSoft2
What are Add-ins availble in licensed version QTP8.2 TCS1
In a webtable, lets say there are 10 records and 1 column. let say "image" is available for 1st,2nd and 3rd records and 4th onwards image is not available. How to recognise for that cell image is available or not?  2
When to Insert transactions in QTP? Siemens2
Where should we turn Smart Identification ON in QTP?  5
What is the DIFF Between PROJECT AND PRODUCT?When Company will need Product?  4
how to capture tool tip in QTP and which check point is needed Syntel2
how to merge object repositories?  4
How to pass parameters to Actions Pls anybody can give the answer.. Thanks in advance... Navis2
can u put checpoints for moving images Accenture2
I wanted to create Data Driven test for login page (loginname,password). Password is same for all the loginnames. I recorded the script for one user. I mentioned all the user names in the global excel sheet with the column name as "Loginname". I mentioned 5 loginnames. I selected tools- >datadriver and select loginname. Select parameterize and select parameter all option.Changed the parameter name to "loginname" which i mentioned in the global excel sheet. I executed the script. For the users 2 and 4 only, the script is failing... can anybody explain why the script is failing for users 2 and 4.  2
How good are you in writing VBscript code for your application? Can you completely write VBscrit for your project with out using recording mode in QTP? CTS3
Write a user defined function to count the no. of buttons existed in a webpage ? i dont want to use descriptive.create () IBM4
Are You using any frame work? What is that? Explain about that. Wipro4
what is batch run ? HCL4
Hi, Can any body please tell me how to create framework in qtp & where i can get some material to learn about it. regards, rahulT  1
How can we close all webbrowsers which are opened in out desctop?  4
Please have a look at this: a = Browser("Travel Boutique Online").Page("Travel Boutique Online_2").webelement("innerhtml:=2622").getroproperty("y") a=a+9 msgbox a Browser("Travel Boutique Online").Page("Travel Boutique Online_2").image("alt:=check","y:=a").click Now please let me explain. As clear from code I am trying to enter value of variable 'a' as Property y. But each time QTP AND MY SYSTEM stops responding when this line is execcuted. But When i enter some number in place of 'a' in the last line. it works fine. Please let me know what I am doing wrong at time of entering the variable in last line. Thanks a lot  3
What the differences are and best practical application of each.  1
what are the different u notice in betweem QTP version 8.2 and 9.2 and what is new in QTP9.2  1
 
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