SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Mar 2001
    Location
    Pune,Maharashtra,India
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mapping custom classes

    User (kavita@prabodhan.com.nospam) posted:

    While Exploring Silk Test Tool using Microsoft Excel/Word as an
    AUT,Silk Test is recognizing menu bar and all the toobars as an
    object of custom class MsoCommandBar.If we try to map the menu bar to
    the standard class Menu, it is treating all other toolbars too as
    objects of menu class. and if we try to map the toolbars to the
    standard class Toolbar, it is treating menu bar as objects of Toolbar
    class and hence depriving us from the use of functions of Class Menu.
    Can anyone help us regarding concept of mapping custom classes to the
    Standard Classes ? we would be grateful.


    Post message: silktest@yahoogroups.com
    Subscribe: silktest-subscribe@yahoogroups.com
    Unsubscribe: silktest-unsubscribe@yahoogroups.com
    List owner: silktest-owner@yahoogroups.com
    URL to this page: http://groups.yahoo.com/group/silktest


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



  2. #2
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mapping custom classes

    You will need to class map your objects to standard objects using Style Bits. That is, mapping only a certain style of MsoCommandBar to the common class.

    Unfortunately, I can't find a good description of how to do that off-hand. Perhaps search the archives on QA Forums for it.

    - Dave


    ------------------
    Amelior Technology
    dreed@ameliortech.com
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  3. #3
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mapping custom classes

    If you are trying to learn the basics of mapping custom objects -- you have picked the wrong application to learn with. The Microsoft applications Excel/Word/Outlook, etc. all have ridiculously overcomplicated GUIs that are very difficult for even experts to script properly.

    I recommend that you pick something simpler. Then search the SilkTest forum. There are numerous discussions of mapping custom objects.

    ------------------
    Rob Kapteyn
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  4. #4
    Senior Member
    Join Date
    Oct 1999
    Location
    Tyngsborough, MA
    Posts
    211
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mapping custom classes

    I 2nd that motion, Word and Excel are totally wacked when it comes to looking at the GUI with Silk. If I needed to automate Word/Excel I would script in vbscript not Silk.

    You mentioned you were 'exploring' the tool. Are you really just beginning? If so, try something simple like Notepad or the Silk provided, GMO app.

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

  5. #5
    Senior Member
    Join Date
    Oct 1999
    Location
    Tyngsborough, MA
    Posts
    211
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mapping custom classes

    I found an old post that has some good info by MikeF. This was the title, "Anyone have a luck scripting MS office apps?". Do a keyword search on 'Excel'. It should show up.

    Must say, I tried using the menu class as you mentioned, but it just doesn't work.

    Looks like MikeF is using coordinates in all of his tags, because Silk can't see any individual buttons.

    If you really want to automate Office you may want to check out a book, "MS Office 97 Visual Basic Programmer's Guide". I haven't used it but I think it's the way to go, using VBA.

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

  6. #6
    Senior Member
    Join Date
    Nov 2000
    Location
    Bloomington, IL
    Posts
    142
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mapping custom classes

    I have been able to create a window declaration using Relative Locations to create custom objects that SilkTest does not see in Microsoft Word and Outlook.

    Fitst you need to class map the custom objects to known SilkTest recognized objects. What I do first is to record the window declarations with the custom objects. Then I go back thru the page using the Window Identifier recorder, so that I know for sure which object is being refered to within the window declaration. I make a list of the custom window declarations and then determine which standard object to map them to. You will also find that several objects that are contained in the captured window declarations cannot be found when highlighting object while using the Window Identifier recorder, these are container classes that cannot be accessed but are still recorded. I map these objects to ignore. This simplifies your window declaration because they usually contain other objects you will want to reference.

    I then comment out the first window declaration and rerecord the window declaration class mapping the custom objects to the SilkTest recognized objects I decided on earlier. Look in Help under mapping classes for more information. Also look up Option files because you will want to save your class mapping in an option file so it is portable.

    Then I look for objects that where not recognized in the window declaration capture. (Example: Buttons on a toolbar) I add these objects to the window declaration as controls and give them a identifier, then using the Window Location recorder I get the client location of the center of the object, this I use as the tag for the object.

    Example:
    [-] window DialogBox MicrosoftWordDoc
    [ ] tag "*Microsoft Word"
    [-] CustomWin MsoDockTop
    [-] msw multitag "[MsoCommandBarDock]MsoDockTop"
    [ ] "[MsoCommandBarDock]#1"
    [+] ToolBar Microsoft
    [ ] tag "#1"
    [+] Control File
    [ ] tag "(22, 11)"
    [+] Control Edit
    [ ] tag "(49, 11)"

    These new objects will not be recognized when using the Action or Testcase recorder, instead they will show up as positional clicks. They can be refered to when scripting and the resulting code is easier to read and use.

    One last thing I have found to make this protable is to get the resolution values on the developement machine (SYS_GetRegistryValue) and making sure any computer you port the script to has the same registry values (SYS_SetRegistryValue).

    Please see my earlier posting refered to above for more information.

    Mike

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

 

 

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 06:03 PM.

Copyright BetaSoft Inc.