SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Junior Member
    Join Date
    Jan 2002
    Location
    chennai
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Call a Visual API from Winrunner

    User Kartik (kartika@sakinfotech.co.in.nospam) posted:

    ------=_NextPart_000_0188_01C237CD.A36984A0
    Content-Type: text/plain;
    charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable

    MessageHi all,


    I would like to know how to call a specific Visual API program from Winrunn=
    er .=20
    Regards
    Kartik


    ------=_NextPart_000_0188_01C237CD.A36984A0
    Content-Type: text/html; charset=US-ASCII
    Content-Transfer-Encoding: 7bit

    < !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
    <META content="MSHTML 5.00.2920.0" name=GENERATOR>
    <BODY bgColor=#ffffff>


    API program from Winrunner . </FONT></DIV>

    < !-- |**|begin egp html banner|**| -->

    test

  2. #2
    SQA Knight
    Join Date
    Jun 2002
    Location
    Cupertino, CA, USA
    Posts
    2,164
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Call a Visual API from Winrunner

    The API must be exported from a dll in extern C format. Use load_dll and the extern function declaration.

    ------------------

  3. #3
    Junior Member
    Join Date
    Jan 2002
    Location
    chennai
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Call a Visual API from Winrunner

    User Kartik (kartika@sakinfotech.co.in.nospam) posted:

    ------=_NextPart_000_0081_01C23880.557474E0
    Content-Type: text/plain;
    charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable

    MessageThanks Scott,

    When I save the file through the Visual API, it saves it as a file as "test=
    .c". So when I try to load this in Winrunner it shows an error message this=
    is not a runner file. Am I making some mistake here. I'm not sure if a .c =
    file can be open . Please clarify.

    Regards
    Kartik

    ----- Original Message -----=20
    From: rrkey@visionair.com=20
    To: winrunner@yahoogroups.com=20
    Sent: Tuesday, July 30, 2002 4:47 PM
    Subject: RE: [winrunner] Call a Visual API from Winrunner


    reload(apiname, 1, 1)
    =20=20=20
    Scott Key=20
    VisionAIR=20
    rrkey@visionair.com=20
    910-675-9117 ext 4080=20

    test

  4. #4
    Senior Member
    Join Date
    Nov 2001
    Location
    Wilmington, NC, USA
    Posts
    152
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Call a Visual API from Winrunner

    User rrkey@visionair.com (rrkey@visionair.com.nospam) posted:

    ------_=_NextPart_001_01C23888.6CB84AC0
    Content-Type: text/plain;
    charset="iso-8859-1"

    Don't load the actual file 'test.c' just reload the api and your test will
    have the appropriate calls to the api.

    Such as
    reload (win32api,1,1)
    color = get_pixel_color,(15,45)


    Scott Key
    VisionAIR
    rrkey@visionair.com
    910-675-9117 ext 4080

    Scott

  5. #5
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Call a Visual API from Winrunner

    User Sunilkumar_Srinivasan (sunilkumar_srinivasan@satyam.com.nospam) posted:

    --------------InterScan_NT_MIME_Boundary
    Content-Type: multipart/alternative;
    boundary="----_=_NextPart_001_01C24812.7653A680"

    ------_=_NextPart_001_01C24812.7653A680
    Content-Type: text/plain;
    charset="iso-8859-1"

    what is this API???
    What has it got to do with adding user defined functions using TSL in to the
    Func. generators??????


  6. #6
    Junior Member
    Join Date
    Aug 2002
    Location
    Chennai,TamilNadu,India
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Call a Visual API from Winrunner

    User Rajesh M (rajesh.mariappan@alcatel.com.nospam) posted:

    ------=_NextPart_000_080B_01C24841.BB31EA80
    Content-Type: text/plain;
    charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable

    APIs can be called as "Task Finishing" funtions.

    Instead of designing the code from scratch, some languages have
    =20=20=20=20
    inbuit APIs. what u need is to do is to call such APIs to accomlish=20

    your task.

    Inorder to use APIs u need to know the what for each APIs are desingned

    for??.

    Regards
    Rajesh M
    ----- Original Message -----=20
    From: Sunilkumar_Srinivasan=20
    To: winrunner@yahoogroups.com=20
    Sent: Tuesday, August 20, 2002 11:56 AM
    Subject: [winrunner] API


    what is this API???=20
    What has it got to do with adding user defined functions using TSL in to =
    the Func. generators??????

  7. #7
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Call a Visual API from Winrunner

    User Khan ?Navaz (khan2navaz@yahoo.com.nospam) posted:

    hi sunil,
    simple e.g to close a window ur script will be
    win_activate("win_name");
    set_window("win_name");
    win_close("win_name");

    this needs to be recorded. but i can do this without
    recording using api compiled module.

    load("win32api");
    win=GUI_get_window();
    win_get_info(win,"handle",hand);
    CloseWindow(hand);

    this code will close the active window.

    Thanks,
    verti

    __________________________________________________

  8. #8
    SQA Knight
    Join Date
    Jun 2002
    Location
    Cupertino, CA, USA
    Posts
    2,164
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Call a Visual API from Winrunner

    Compile your Visual Studio project as a dll which exports a function in extern C format. Your function declaration in the .h file should look something like this:

    /************************************************** **/
    #include "stdio.h"
    #include "windows.h"
    #define EXPORT extern "C" __declspec( dllexport )

    EXPORT void add2 (int x, int* y);

    /************************************************** **/


    Your .c file should look similar to this:

    /************************************************** **/
    #include "example.h"

    EXPORT void add2 (int x, int* y)
    {
    *y = x + 2;
    }
    /************************************************** **/


    ------------------

  9. #9
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Call a Visual API from Winrunner

    User Santosh A.M. (santosha@subexgroup.com.nospam) posted:

    ------=_NextPart_000_000C_01C248F5.1998D8F0
    Content-Type: text/plain;
    charset="US-ASCII"
    Content-Transfer-Encoding: 7bit

    Dear All,

    I was not knowing that winrunner has API's and it can be used to do low
    level programming.

    Thanx. VERTI for giving this valuable information.

    I tried to close the window with the API calls which you had mailed

    load("win32api");
    win=GUI_get_window();
    win_get_info(win,"handle",hand);
    CloseWindow(hand);

    I faced the following problems.

    My intention was to close a notepad window. I made winrunner learn all the
    objects of notepad and used the above API calls to close the notepad window.


    1. load("win32api"); - this got executed and loaded win32api successfully

    2. win=GUI_get_window(); - this also got executed successfully but, the
    active window is always treated as BaseBar rather than the Notepad window.

    How do I make the Notepad window as active window so that I can close the
    Notepad window using APIs

    3. CloseWindow(hand); - this is not an inbuilt function, which is the
    inbuilt function to close the window using its handle ?
    Regards
    SANTU.
    Let change follow you.


  10. #10
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Call a Visual API from Winrunner

    User Shivaprakash GK (GK.Shivaprakash@blr.spcnl.co.in.nospam) posted:

    ------_=_NextPart_001_01C248CC.B6D054F0
    Content-Type: text/plain;
    charset="iso-8859-1"

    use win_activate("Window"); statment to activate the notepad window.
    Pls replace Window by notepad!!

    Hope this solves ur problem.
    Shiva


 

 
Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 08:19 AM.

Copyright BetaSoft Inc.