SPONSORS:






User Tag List

Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Feb 2002
    Location
    austin, tx
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HtmlPushButton always enabled

    I'm trying to verify the enabled/disabled status of some buttons in different states of our applciation, but for some reason the buttons are always being perceived by Silk as enabled, even though they are clearly disabled. The developers are not doing anything special, just toggling the property based on the state of the app, and also certain user actions. Anyone have this problem, and any suggestions?

    Thanks for any help.

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

  2. #2
    Senior Member
    Join Date
    Sep 2002
    Location
    ONDlodnol
    Posts
    111
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: HtmlPushButton always enabled

    Try using a boolean expression setting the buttons to the opposite of the state your trying to verify.
    Example
    const BOOLEAN bcontrol = FALSE


    ------------------
    Goodness is a part of life just like the Devil

  3. #3
    Junior Member
    Join Date
    Feb 2002
    Location
    austin, tx
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: HtmlPushButton always enabled

    I'm not sure I follow. What does setting a boolean variable do to the status of the object property, and my ability to read that status?

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

  4. #4
    Member
    Join Date
    Sep 2001
    Posts
    69
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: HtmlPushButton always enabled

    I'm having a similar problem. The following code always Fails when the push button is clearly disabled.

    testcase test() appstate none

    Browser.SetActive()
    BOOLEAN bExpected,bActual

    bExpected = FALSE
    bActual = LoginPage.Submit.IsEnabled()

    Verify(bActual, bExpected)



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

  5. #5
    Senior Member
    Join Date
    Aug 2001
    Location
    Manchester, NH
    Posts
    121
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: HtmlPushButton always enabled

    Add me to the list of people with the same problem.

    ------------------
    Adam Kuczkowski
    akuczkowski@frametech.com

  6. #6
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: HtmlPushButton always enabled

    Well there is another bug. The API call IsWindowEnabled (user32) also returns TRUE everytime. Maybe that is why....



    ------------------
    James Soderborg
    http://www.ameliortech.com
    jamesso@ameliortech.com

  7. #7
    Member
    Join Date
    Sep 2001
    Posts
    69
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: HtmlPushButton always enabled

    I found a workaround using the cursor type when placed over the button. You could also probably check the font to make sure it is not bold. I didn't try that but I think it will also work. Here is some working code.


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

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

    Re: HtmlPushButton always enabled

    Is it a javascript thing?

    I'm just beginning to wrestle with that stuff in trying to test the app we're working on. It's got all kinds of stuff in the html that's mixed in with javascript for controlling how it presents, depending on the user's actions, without calling back to the server for new html. So as far as I can tell, Silk sees the same things in front of it all the time, although my own eyes see different things. The developers here don't know Silk much at all, and I haven't been able to make much headway in solving what's happening, either. I'm a self-taught intern here.

    Anyway, what caught my eye was your saying it calls itself enabled when it's plainly not. I see IsEnabled() and IsVisible() and IsActive() returning TRUE for lots of stuff that's either not enabled, not seen on the page, or plainly not active. Very frustrating. No answer for you, but maybe a pointer in the direction you need to look?

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

  9. #9
    Senior Member
    Join Date
    Aug 2001
    Location
    Manchester, NH
    Posts
    121
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: HtmlPushButton always enabled

    To be fair in my case our buttons are actually seen as HtmlText. However I was still hoping plain old IsEnabled would return what I see, but it doesn't. Anyway, the cursor solution doesn't work for me either, because the cursor is the hand icon on both the enabled and disabled button. BTW, the hand icon doesn't even seem to be a recognized cursor type by silk. Also I checked all the properties for the button (htmltext in my case) that I can get, and none of the font or color properties are any different from an enabled button. So i'm still in search of a solution. This isn't stopping me from working on other things, but at some point i'll need to get something working for this.

    ------------------
    Adam Kuczkowski
    akuczkowski@frametech.com

    [This message has been edited by akuczkowski (edited 02-14-2003).]

 

 

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 12:47 AM.

Copyright BetaSoft Inc.