SPONSORS:






User Tag List

Results 1 to 4 of 4

Thread: Function calls

  1. #1
    Junior Member
    Join Date
    Jun 2002
    Location
    pune,maharashtra,india
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Function calls

    hi,

    if i want to get the string value from a window object ,e.g:-
    i want to pick up a string "email address"
    the procedure which i want the silk test to execute is- open mailbox, from the inbox, open a mail , and capture the email address in the 'to' field.

    this was wht i did:-
    [ ] STRING str
    [ ] str = DialogBox("* - Message (RichText)").DialogBox("E-mail Properties").StaticText("E-mail address:|$4514").GetText ()
    [ ] print (str)

    this code gives result as the string "E-mail address " instead of giving me the value, "xyz@company.com"
    how can i get this value ?



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

  2. #2
    Junior Member
    Join Date
    Aug 2001
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Function calls

    it seems to me as you are accessing the wrong object: the gettext() retrieves the label (static text). The adress you're looking for is contained in a separate object, which off course has to be adressed separately.

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

  3. #3
    Junior Member
    Join Date
    Jun 2002
    Location
    pune,maharashtra,india
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Function calls

    hello,

    actually i have defined a new method which will select all text from the text field of the "email properties" dialogbox which is recognized as a customWin object.

    but i dont know from where to call the method.(i mean which file?)
    i was trying to insert this method in the frame.inc file but then from the testscript how will i refer it, or call it?
    i do'nt know where to exactly define it/declare it?

    can anybody help?

    regards,
    QASuvarna.

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

  4. #4
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Function calls

    Placing any custom method you write in an include file is perfectly fine. Simply place a use statement at the top of your script. For example, my current script's first two lines read

    use "Core.inc"
    use "HealthWeb.inc"

    HealthWeb.inc has all the declarations for the current project. Core.inc has numerous shared functions just like what you have described. If you have the use statement in place as described above, everything inside that include file (your frame.inc) will be available to you.

    I also strongly encourage you to take the time to get some "clean" declarations of your applications. If you do this, your current call:
    will look more like

    A well constructed include file will allow you to eliminate the "tag" data in your script. Readability and maintenance are greatly improved.

    Good luck!



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

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 09:15 AM.

Copyright BetaSoft Inc.