SPONSORS:






User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Junior Member
    Join Date
    Jul 2001
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Silk and Javascript -- how to get them to play nicely together?

    This query was also sent to Segue Technical Support. Let's see if you all can get me a solution before they do.

    SilkTest 5.0.3.2 on Windows 2000
    Internet Explorer 5.00.3103.1000
    Using IE DOM support

    When running automation against a page containing Javascript, SilkTest acts as though it has clicked a particular link, but the action that is supposed to occur when the button is clicked does not occur, and the script fails at the following line because the expected page does not appear. Performing these same steps manually works just fine, and the only thing I can think of is that SilkTest is in some way affecting how the Javascript code behaves. This is not a completely random assumption, since I've seen other instances of SilkTest subtly affecting Javascript in pages. For instance, there was another page with a dropdown, and when SilkTest selected an object from the dropdown I got a Javascript runtime error because a variable was undefined. Again, performing the same steps by hand worked just fine.

    Is there any way around this problem?

    Lisa Farley
    eRoom Technology, Inc.


    ------------------
    If it wasn't for disappointments
    I wouldn't have any appointments.
    -- They Might Be Giants

  2. #2
    Member
    Join Date
    Jun 2001
    Location
    Berkeley, CA, USA
    Posts
    67
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk and Javascript -- how to get them to play nicely together?

    Have you tried slowing the script down a bit?

    It's possible Silk is trying to access the object before it's completely in memory.

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

  3. #3
    Junior Member
    Join Date
    Jul 2001
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk and Javascript -- how to get them to play nicely together?

    Well, I hadn't, but I just added a 2-second sleep prior to the Click call, and that seems to have had no effect. The mouse moves over the link, highlighting it, and nothing happens.

    For the record, I've also tried doing a SetFocus and then doing a TypeKeys ("<Enter>"), and I've also tried performing a MoveMouse followed by the click. All had no effect.

    ------------------
    If it wasn't for disappointments
    I wouldn't have any appointments.
    -- They Might Be Giants

  4. #4
    Member
    Join Date
    Jun 2001
    Location
    Berkeley, CA, USA
    Posts
    67
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk and Javascript -- how to get them to play nicely together?

    Do you keep the NumLock key on? I just had a problem where the NumLock key was keeping Silk from typing to the screen.

    The behavior was similar to what you're describing - when done manually the key combination worked fine. When done with Silk the test would fail because the action never occurred.

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

  5. #5
    Member
    Join Date
    Jun 2000
    Location
    Derby, UK
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk and Javascript -- how to get them to play nicely together?

    Lisa,
    Ive had loads of fun with Javascript in our web app.
    I found that where Javascript was added to a control that event was not fired when silk ran.
    For example i had problem with an HtmlPopuplist that changed screen layout dependant on its selection. In the end i made a workaround which triggered the event....
    Use this as you would use select:
    (see comments)
    [-] void OnChange(String ListEntry)
    [ ] integer x
    [ ] this.click()
    [ ] x=this.FindItem(ListEntry)
    [-] if (x>1)
    [ ] this.Select(x-1)
    [ ] this.typekeys("<down>")//down should be in quotes here
    [ ] this.typekeys("<enter>")//enter
    [-] else
    [ ] this.Select(x+1)
    [ ] this.typekeys("<up>")//up
    [ ] this.typekeys("<enter>")//enter


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


    [This message has been edited by James.Woolfenden (edited 07-06-2001).]

  6. #6
    Junior Member
    Join Date
    Jul 2001
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk and Javascript -- how to get them to play nicely together?

    Ah-ha. Go back to the old, tried and true VO support, and I am able to click on the link with no problem. Turn on DOM support and SilkTest in some way inhibits the JavaScript.

    Unfortunately, it's not as simple as just going back to VO. The whole reason I went to the DOM support in the first place was because I had other objects that the VO didn't see correctly. One option, I suppose, would be to flip back and forth between DOM and VO in the code. Does anyone have experience doing that? How successful was it? Any tips?

    Lisa


    ------------------
    If it wasn't for disappointments
    I wouldn't have any appointments.
    -- They Might Be Giants

  7. #7
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk and Javascript -- how to get them to play nicely together?

    Silk actually does a clicking on the link. When you do Click() it finds the object and click on it using win32apis. I think maybe in the process of getting the information Silk screwd the html page. It's also possible that Silk failed to reach the Click() it calls internally, if you see the cursor at the correct place but nothing happens(that can happen if browser is screwed or an early exit).

    I had experience where when the browser is screwed by Silk. My dropdown(with onchange on every option) would not work even mannually afterwards. Sometimes you see a error message in the status bar.


    ----
    in 5.032 switching btween VO and DOM is very unstable. For some it worked for most including it fails(crashes Silk).

    DOM has problems with HtmlPopupList, it's a known bug, so start making decision(workaround or skip this feature

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

  8. #8
    Junior Member
    Join Date
    Jul 2001
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk and Javascript -- how to get them to play nicely together?

    Sigh. There seems to be no good solution to this problem. I've implemented code to flip-flop between the VO and DOM extensions, and now I'm getting a browser crash when I do the Browser.LoadVOExtension () call. I've tried updating my version of SilkTest to 5.5, and I've tried updating my Internet Exploder to 5.5 as well. Still no luck. She crashes and burns when I load the VO extension.

    Any *other* ideas?

    Lisa
    If it wasn't for disappointments
    I wouldn't have any appointments.
    -- They Might Be Giants

  9. #9
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk and Javascript -- how to get them to play nicely together?

    Still not fixed(switching between DOM/VO) in Silk5.5??? What are they doing????

    5.0.32<my version
    5.5<- why this numbering so ugly

    I hope we get v6 soon if any!!!!

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

  10. #10
    Junior Member
    Join Date
    Jul 2001
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk and Javascript -- how to get them to play nicely together?

    Apparently not. As soon as I call Browser.LoadVOExtension () I get the following:

    QAP_CALL: iexplore.exe - Application Error

    The instruction at "0x01d35abc" referenced
    memory at "0x01d35abc". The memory could
    not be "read".

    You get the idea. Ugly, smoking wreckage. And I still have no solution to my problem.

    Lisa
    If it wasn't for disappointments
    I wouldn't have any appointments.
    -- They Might Be Giants

 

 
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
  •  

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 02:09 AM.

Copyright BetaSoft Inc.