Results 1 to 5 of 5

Thread: Launch notepad file by using QTP

  1. #1
    Geek_Guest
    Guest

    Launch notepad file by using QTP

    Question asked by visitor sivareddy

    How to launch the notepad file by using QTP, which library function we can use


  2. #2
    Contributing Member
    Join Date
    Feb 2007
    Answers
    48

    Re: Launch notepad file by using QTP

    Hi Geek Guest,

    I am not getting your question.

    You can use:
    01. SystemUtil.Run "notepad.exe","","","open"

    02. Dim fso, f
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.GetFile("D:\Sample.txt")

    Please let me know if this is not that you were looking for.

    Regards,
    Ganesh SM


  3. #3
    Contributing Member
    Join Date
    Feb 2007
    Answers
    61

    Re: Launch notepad file by using QTP

    Same way for notepad as it was for Excel

    Dim excelobj, count

    count1 = 2

    Set excelobj = createobject("Excel.Application")



    excelobj.create("C:\x.xls")



    excelobj.workbooks.open("C:\Rag.xls")

    Set y = excelobj.Activeworkbook.worksheets("RRR")

    While not isempty(excelobj.cells(Count1,1))

    d=excelobj.cells(count1,1).value
    e=excelobj.cells(count1,2).value
    msgbox("User Name="&d&"Password="&e)

    count1=count1+1

    Wend


    excelobj.workbooks.Close("C:\Rag.xls")


  4. #4
    Junior Member
    Join Date
    Apr 2007
    Answers
    23

    Re: Launch notepad file by using QTP

    hi this is vijay give systemutil.run("path")


  5. #5
    Expert Member
    Join Date
    Apr 2007
    Answers
    147

    Re: Launch notepad file by using QTP

    Hi
    You can also do this with shell scripting

    Dim shell
    Set shell = createobject("wscript.shell")
    shell.run"notepad.exe"


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact