SPONSORS:






User Tag List

Results 1 to 10 of 10
  1. #1
    ANH
    ANH is offline
    Junior Member
    Join Date
    Jul 2001
    Location
    Peterborough, England
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Silk Test 5.5 and Javascript

    I'm experiencing a problem with Silk Test 5.5 on a web app that has a lot of javascript on it. Any advice/help would be great!

    My problem is this: Silk recognises the page fine when it first appears, however when the javascript on a page causes the display to change (eg. different objects appearing) Silk does not recognise the fact that the screen has changed. I have experimented with the agent options but this does not seem to help.

    Can anyone shed any light on this problem please?


    Thanks,

    Anh Diep.


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

  2. #2
    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: Silk Test 5.5 and Javascript

    What would constitute Silk recognizing the screen changing? Are you trying to access a new object and unable to do so?

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

  3. #3
    Senior Member
    Join Date
    Jul 2000
    Location
    Walsall, West Midlands, United Kingdom
    Posts
    259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk Test 5.5 and Javascript

    This doesn't help directly but, I had a problem with a previous version of SilkTest (5.0.3), where an onchange on one dropdown, was populating the lists in another dropdown, depending on what was selected.

    SilkTest could not pick up the new lists after the changes were made.

    After every possible combination of agent settings possible, Segue suggested I then upgraded to the patch 5.0.3.1 and the problem was solved... so might be an old bug re-surfacing.

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

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

    Re: Silk Test 5.5 and Javascript

    This might be a old bug.

    in 5.032 under DOM, popuplist would cause browser to crash or in error state when they are using onchange(most of the time;sometime non-onchange does it too).

    What can't you do exactly? Just a thought, try some fun stuff with BrowserPage.ExecScript({'yourJavascript'})

    yourJavascript: can be any document.object
    and public java applet functions, and public javascript functions(even if they are defined in external files)

    Sometimes doing stuff too fast without you noticing it, it screws the test or browser.

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

  5. #5
    Senior Member
    Join Date
    Jul 2000
    Location
    Walsall, West Midlands, United Kingdom
    Posts
    259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk Test 5.5 and Javascript

    GodKnows,

    That ExecScript function sounds excellent, although I can't see any documentation on it with 5.0.3.2.

    Are you sure it's in 5.0.3.2 or is it 5.5? Either way I must know more, if you do have some documentation on it, I must see

    Cheers.

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

  6. #6
    Junior Member
    Join Date
    Jul 2001
    Location
    Peterborough,Cambridgeshire,UK
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk Test 5.5 and Javascript

    I am a programmer working with Anh.

    The problem is that when in script design mode SilkTest seems to build up a cached definition of the exposed page elements and their coordinates.

    If page activity results in JavaScript exposing new DIV elements on the page, these are not accessible because the SilkTest element cache is not updated.


    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by DJGray:
    What would constitute Silk recognizing the screen changing? Are you trying to access a new object and unable to do so?

    <HR></BLOCKQUOTE>



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

  7. #7
    Senior Member
    Join Date
    Jul 2000
    Location
    Walsall, West Midlands, United Kingdom
    Posts
    259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk Test 5.5 and Javascript

    I misunderstood.... sorry.

    Try running a script and then execute and print the output from a GenerateDecl() function on the app after the DIV objects are invoked. Then look in the declaration and see if the DIV objects are there.

    If they are there and these objects follow the same structure regardless of the actions performed prior to invoking, then make a new declaration of the window, and treat as normal (be careful with the object tags if they are the index tag as these may change before and after they are invoked).

    If the structure does change then you'll have to handle these as dynamic objects, i.e. forget about making a declaration and just call them on the fly. If you know what you are expecting in the event, call them similar to this, of course depending what you want to do with them:

    BrowserPage.HtmlLink("SomeExpectedCaption").Click( )

    If Silk can't see the objects, but all you need to do is verify they are there... then a quick workaround until you find out why they are not seen is to use bitmap capturing and verification.

    I hope this helps.

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

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

    Re: Silk Test 5.5 and Javascript

    Ok I saw this ExecScript in the segue.com. Just do a search on 'ExecScript' and you will get only one document.


    It's a presentation on new features on silk5.5; lucky me i tested all of them and most of them work under silk 5.032 except ExecFunction()[which can be simulated by ExecScript].

    As you see these are features for 5.5 so under 5.032 there is no documentation. Somehow they are already implemented.

    I am thinking maybe they didn't do anything new, but only exposing functions that they've been using for a long time.


    This function accepts javascripts commands and it doesn't return any values; you can't pass value back using arguments; but you can pass in silk variables using {}.

    like calling javascript/applet public and native functions loaded within page(loaded include file works too). you can access Html controls, if they don't have a name you can use index. You have to know javascript and html well.

    document.formname.selectname.options[1].value
    ex:
    BrowserPage.ExecScript({'o=new Objectdocument.formname.selectname',
    'for(i=1;i!=o.length;i++)
    if(o.options[i]
    =='GodKnows) alert("this is so cool")'})

    ExecScript accepts a list of string between single quotes(''). ExecLine is the same but only executing one statement at a time.

    Javascript is case sensitive; unlike Silk which is not for the function name.

    Becarefull of variable life scope. You may want to declare variables before you use them everywhere.

    debug using built-in alert() function to see the variable values. Also build your script step by step so you see where it went wrong.

    Consider script speed. If you run consecutive script too fast, it won't work. Perticularly if your page is not loaded yet.

    Patience you will need if you have no documentation. If you have Silk5.5 documentation can you paste it here or send me the help file to my email address here.

    //---5.032: more undocumented functions
    GetImages
    GetLinks
    GetPageSource
    ...

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


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

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

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

    Re: Silk Test 5.5 and Javascript

    I don't have time to format and put more info here. I hope you see what this function suppose to do and accomplish.

    I am not sure about the stability of this function but I use it to fix the HtmlPopupList bug, which works most of the time now, but still cause problems.

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

  10. #10
    Junior Member
    Join Date
    May 2002
    Location
    France
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk Test 5.5 and Javascript

    A workaround that worked for me:
    Browser.FlushCache()
    Browser.GenerateDecl()
    Browser.GenerateDecl() (yes...twice (?)..)

    ..Eventually the declaration seems correct


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

 

 

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 08:58 PM.

Copyright BetaSoft Inc.