Results 1 to 4 of 4

Thread: Writing Test Script Language in QTP

  1. #1
    Junior Member
    Join Date
    Apr 2007
    Answers
    1

    Writing Test Script Language in QTP

    How can I write Test Script Language in QTP,
    Can someone please write some sample of TSL,
    and some command.

    Please give various to try

    Thanks Guys
    Olateejay


  2. #2

    Re: Writing Test Script Language in QTP

    QTP uses vbScript.

    Set qtApp = CreateObject("QuickTest.Application")
    qtApp.Launch
    qtApp.Visible = True

    The above code will create the application object, start it and make it visible.


  3. #3
    Expert Member
    Join Date
    Oct 2007
    Answers
    375

    Re: Writing Test Script Language in QTP

    Hi, as Anshoo stated, qtp is based on vbscript.

    When you state Test Script Language are you hinting at the kind of scripting used in winrunner ? incase yes, it would be difficult to implement the same in qtp as it is basically based on vbscript and more oriented towards event-driven and object oriented programming concepts.

    Only possiblity is working with objects as Anshoo stated or depicted in code below -

    set obj = CreateObject("InternetExplorer.Application").
    obj.visible = true.
    obj.navigate "http://www.google.com".

    obj.statusbar = 1
    while obj.readystate = true
    strstatus = obj.statustext
    if strstatus = "done" then
    msgbox "application loaded completely"
    end if
    wend

    Cheers...

    Last edited by bizzzzzare; 01-11-2008 at 01:41 AM.

  4. #4
    Junior Member
    Join Date
    Dec 2007
    Answers
    1

    Thumbs up Re: Writing Test Script Language in QTP

    Hi olateejay,

    Normal DP (Descriptive Programming) decribes this way, in DP there are two types of objects.

    1. Standard object
    2. Custom object

    The script below is for standard object,
    eg: login screen systemutil.run"d:drivers\application\application.exe file
    // (To call your exe file to action).
    Set a=dialog("text:=login")
    // (To know the wat kind of object the window is, just do the thing what I have mentioned, click on object spy, place the hand icon the window or what ever you want)
    a.activate
    // (To enable the dailog screen)
    a.winedit("attached text:=user name:").set"name"
    a.winedit("attached text:=password:").set"ur password" a.winbutton("text:=ok").click

    format for the above is [object("property:=value).operation] winedit, winbutton, window, dailog these re standard objects.

    For custom object, all the properties it will be winobject. I think this will help to understand a bit. If not, feel free to mail


  5.  Sponsored Ads
    Ad


     

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