Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ sahipro.com with your query.

Getting JQuery working in Sahi

edited July 2014 in Sahi Pro
Hello all,

I've written a JQuery-heavy library I want to use in my test scripts. I originally had issues getting JQuery to work in IE so I found a post that said adding <script src='/_s_/spr/ext/jquery/jquery.min.js'> to SahiPro/config/inject_top.txt would fix that. In IE it did. But Firefox (v30.0) still can't find the jquery.min.js.I also tried using different versions of JQuery but no luck. Has anyone else encountered this issue and found a fix?

Thanks,

Scott

Comments

  • edited May 2016 Members
    Not sure if this helps, but if the problem is the error of "$ is not defined", perhaps this can help:
    use "eval" within the function, and use the jquery identifier as a string

    var $test = '$("button.className")[1]';
    _highlight(eval($test));
  • edited May 2016 Members
    //
  • Members
    actually a better solution: avoid using variables for the jQuery location, and use "_set"
    _set($href, _link(0, _in($('div[style*="background-color: #f9f9f9"]')[0])).href)
Sign In or Register to comment.