SPONSORS:






User Tag List

Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Nov 2000
    Location
    Tampa, FL USA
    Posts
    90
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    executing a javascript within 4Test

    I'm having problems with my LoadPage becuase the URL's generated by the application are so huge. This URL that I have used in the loadpage was saved earlier in my script using GetLocation. Now, I would like to Load the page in another fashion. I see in the status bar, while loading a link: ' javascript: GoNav("Home")', where home is a panel name.
    Is there a way that I can execute this java script directly from my 4Test script to go to the panel that I need to go to?

    PS I searched this forum on anything regarding this and found nothing.
    I am also not very familiar with java.


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

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

    Re: executing a javascript within 4Test

    Try: BrowserPage.ExecLine('')
    BrowserPage.ExecScript({'',''...})

    Both excute javascript within Silk, but the latter one uses a list of commands, so you can run a series of code.

    In Silk 5.32 these 2 functions are not documented, and in 5.5 they are.

    Read javascript, and DOM stuff to see how you can use them properly. Basically everything that you can call within your html page you should be able to call it using these functions.

    ex:
    BrowserPage.ExecLine('GoNav("Home")')

    Everything has to be single quoted, and sometimes the quotes can make the call bad.
    These functions can't return anything. You can pass in Silk variables but you can't pass out values using Silk's variables.

    Caveat: these functions can crash or make javascript errors on the page(rendering it useless, you can use reload to correct that but cleans all user input in a form), so use them with caution. My tip is use them as the last resort.

    If you have Silk5.5's doc on these functions can you send it to me


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

 

 

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:30 PM.

Copyright BetaSoft Inc.