SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Senior Member
    Join Date
    Apr 2005
    Location
    chennai
    Posts
    182
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Unix Application

    hi all,

    How to retrieve the text from an unix application.
    i tried to use "Capturebox" command,but the CaptureBox option relies on Mouse Coordinates.Is there a better approach in QARun?
    e.g

    my application contains userid field,i have to retrieve the text from that field.

    plz let me know the procedure.

    regards,
    krishna
    S.K

  2. #2
    Senior Member
    Join Date
    Apr 2004
    Location
    Crewe, England
    Posts
    304
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Unix Application

    Krishna,

    I suggest trying the Capture command.

    This will be something like

    Ret = Capture(controlname)

    I usually find it easier to use the Identify option to get the control name that QARun uses for the control.

    Hope this helps
    Regards
    Graham

  3. #3
    Senior Member
    Join Date
    Jan 2001
    Location
    Grandville, MI, USA
    Posts
    201
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Unix Application

    It could possibly depend on the way you are accessing the UNIX application too.

    If you're using an emulator, you may be able to retrieve coordinates (not x-y, but line and space) in the emulator... so if your text you want to capture is on line 5, 25 characters in, 20 characters in length... the emulator may be able to capture this for you and pass it to the clipboard. [img]images/icons/wink.gif[/img]

    You may find something under Macros for your emulator. I know I used to do this for Attachmate capturing when I was automating the mainfrmae.

    Good luck!

  4. #4
    Senior Member
    Join Date
    Apr 2005
    Location
    chennai
    Posts
    182
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Unix Application

    Hi

    Thanks for your reply.

    I think Capture command will retrieve all the text from a single window.I would like to know,is there any specific command to retrieve the text from partcular line.

    Kindly let me know the procedure

    Regards,
    Krishna
    S.K

  5. #5
    Senior Member
    Join Date
    Apr 2004
    Location
    Crewe, England
    Posts
    304
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Unix Application

    Krishna,

    Yes, you are correct, if you enter the windowname as the controlname it will capture all the text in the window.

    However, if you enter the controlname of the userid field it will only capture the text within that control.

    Ret = Capture(controlname of userid field)

    Regards
    Graham

  6. #6
    Senior Member
    Join Date
    Apr 2004
    Location
    Crewe, England
    Posts
    304
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Unix Application

    Krishna,

    Another option you could try is

    Get handle of the iser id control

    hCtrl = EditFind( "User id" )

    Capture the text in the user id field

    ret = CtrlSelText( hCtrl )

    Regards
    Graham

  7. #7
    Senior Member
    Join Date
    Apr 2005
    Location
    chennai
    Posts
    182
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Unix Application

    Hi Graham,

    Thanks for suggestion.

    I tried to use capure and CtrlselText command,but i am not able to get the text,these functions returning empty values.......

    plz c the code.


    script1using capture)
    -----------------------
    Attach "Enter Sign on Details PopupWindow"

    hCtrl = EditFind( "&User Id:")

    Ret = Capture(hctrl)
    msgbox("",ret)


    script2using ctrlseltext)
    ---------------------------

    Attach "Enter Sign on Details PopupWindow"

    hCtrl = EditFind( "&User Id:")

    ret = CtrlSelText( hCtrl )
    msgbox"",ret
    S.K

  8. #8
    Senior Member
    Join Date
    Apr 2004
    Location
    Crewe, England
    Posts
    304
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Unix Application

    krishna,

    In the command

    hCtrl = EditFind( "&User Id:")

    did you use the indentify option to get the control name?
    If you didn't I would suggest you try this, I have often found that when I would expect the control name to be say, "&User Id:" it actually turns out to be something like "Enter Sign on Details PopupWindow~"&User Id~1".

    Another thing you could try just to check out, attach to the "Enter Sign on Details PopupWindow"
    then if you try
    capture("Enter Sign on Details PopupWindow")

    Does this include the text in the userid field?

    Regards
    Graham

  9. #9
    Senior Member
    Join Date
    Apr 2005
    Location
    chennai
    Posts
    182
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Unix Application

    Hi Graham,

    I identified that editbox(user id) and then apply that attach name in capture command.

    i hereby provide you the code.....

    Code
    ----
    Attach "Enter Sign on Details PopupWindow"
    a=capture("~N~QADEMO.EXE~Edit~&User Id:")
    msgbox"",a

    now i am able to get the text from that editbox, whether this way is correct....?

    -krishna
    S.K

  10. #10
    Senior Member
    Join Date
    Apr 2004
    Location
    Crewe, England
    Posts
    304
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Unix Application

    krishna

    Glad it's working.

    I usually use the identify facility if, as in cases like this, it doesn't seem to get the control I expect. Usually because it needs a longer name than you might expect.

    It works this way so that's ok. In most, if not all programming languages there is more than one way of achieving something. When you get a few minutes try using
    CtrlSelText("~N~QADEMO.EXE~Edit~&User Id:")
    and you should find this works as well.

    This will give you another option that works when you need to do something similar the next time.

    Regards
    Graham

 

 
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.71%
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 03:52 AM.

Copyright BetaSoft Inc.