SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Senior Member
    Join Date
    Jun 2002
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to get silk to tell me an object\'s screen location?

    Trying to find a way to test a feature of our web app. It's a web portal with custom page content for the user. There's a link on each page that brings up a popup window where you can change the layout of the components of the page, with drag and drop of little images that represent those components. When you click Done to return to the page, the layout is changed to what you did.

    I'm trying to find a way to write a testcase for that, and I'm thinking that if I could get Silk to do some kind of GetLocation() of the little images, before and after the drag and drop, I could verify. I've been able to do the drag and drop, using DragMouse(), and it works, but then what? The only thing I can find is GetLocation, but that seems to be for the location of the taskbar.

    The tags for the images are explicit - @72,264, for example. As I move the mouse over things while doing a Record Window Declarations, I can see the tag change if I drag the image - @112,264. How can I get at the numbers in the tag?

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

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

    Re: How to get silk to tell me an object\'s screen location?

    Why not GetRect()?

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

  3. #3
    Senior Member
    Join Date
    Jun 2002
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get silk to tell me an object\'s screen location?

    Didn't think of that one. I see Silk call that one all the time as a step in clicking a button. Thanks, I'll try it when I get to work.

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

  4. #4
    Senior Member
    Join Date
    Jun 2002
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get silk to tell me an object\'s screen location?

    Perfect!!

    And I can use it to get the location for my DragMouse() calls, too

    Thanks a lot

    F

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

  5. #5
    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: How to get silk to tell me an object\'s screen location?

    Felecha,

    I use GetRect() a ton! Pretty much any time Silk has a problem manipulating an object because it just can't seem to locate it, GetRect() pulls through for me. A great example of this is the JavaScript menu items our devs are writing are not viewable by Silk. Silk sees them as HtmlText, so I wrote a little ClickLeftMenuItem(string sItem) function that gets a rect on that text and clicks there.

    GetRect() is one of my heros.

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

  6. #6
    Senior Member
    Join Date
    Jun 2002
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get silk to tell me an object\'s screen location?

    DJGray --

    Very interesting stuff. When I started here I was fresh out of school, and didn't even know much HTML. The comapany puts out some industrial strength stuff, many text pages of wild javascripting etc for a single web page, and it's been exciting to figure my way through what it all means and how to get Silk to deal with it. The more I learn the more I see tricks I can use to get what I want. The GetRect thing has been wonderfully helpful. Luckily, all the javascript items are seen as HtmlLinks in this one.



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

  7. #7
    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: How to get silk to tell me an object\'s screen location?

    Ahh, then you are most fortunate. The JavaScript that is being produced here (my current contract position) is not Industrial-Strength. No... approved for Home Use Only!

    Anyway, I'm excited that you are enthusiastic about what you are learning.

    Stay here. I love this forum. You'll find some heavy-hitters here who are very free with their knowledge and insight.

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


    [This message has been edited by DJGray (edited 09-20-2002).]

 

 

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 07:19 AM.

Copyright BetaSoft Inc.