Contributions
Re: Underscore.js library
btw the method i posted above of creating a container for the instance works for many other libs as well. if a js lib is made to be platform independent, just look thru the code and find out where the code is to add it to window, or whatever the fall back global is. at this point you can have it fall back to a global var that you create to hold it. if anyone knows a better way please share.1.6KViews0likes0CommentsRe: Underscore.js library
Jose, I'm not using it as an extension, just add as a regular reference. Basically you have to create a container for the instance. Here's what I did, you can use other variable names if you don't like these. 1) rename the lib to .sj 2) at the top of the file add: var _underscore = {}; 3) find the line near the top of the lib that has this code: var root =this; change it to: var root = _underscore; 4) at the bottom of the file, after the lib code add // create the underscore global var _ = _underscore._;1.5KViews1like0CommentsRe: VisibleOnScreen property always TRUE
I can also attest that this property does not work. I've had to resort to testing the state of other objects to find out if the object is actually visible on screen. Seems like this is related to AJAX stuff, but I'm just conjecturing about. that.1.9KViews0likes0CommentsRe: Underscore.js library
"for an HTTP Client I just have a simple synchronous JScript wrapper round MSXML2.XMLHTTP" Yes we do the same. We use TestRail for test case management and access data and post results via the REST apil. We also store stats to mongodb using Sleep.Mongose REST api since there is no TestComplete driver. I've asked SmartBear to implement a modern http client, but they refuse, saying we should buy "SoapUI" even though it has nothing to do with our usage pattern. I think a modern http client should now be considered a requirement, it's not just used for testing. I hope they will soon change their stance on this. We should not have to use this ancient ActiveX technology.2.5KViews2likes0CommentsRe: Underscore.js library
Phil are you bridging out using the CLR bridge for an http client? If you don't mind sharing about your implementation I'm curious. As far as utility goes, Underscore is the most useful library to me. It's almost canonical in the web development world and the subject of more than one book. I would say it's not going away. I completely disagree with the idea of using the built in objects over JavaScript ones. JavaScript is what's not going away. The code will work in any JavaScript engine whereas the TestComplete objects only work in TestComplete. You can always find code on Stack Overflow or the like to do something in JavaScript.2.5KViews0likes0CommentsRe: Underscore.js library
Yes the TestComplete runtime is bizarre. I honestly know far, far more about JavaScript than I intended to learn trying to puzzle out and work around the weird behavior. If TestComplete wasn't a tool already in place where I work, I would have some pretty serious objections, which I hope SmartBear will fix. It needs upgrade JavaScript engine and IDE improvements. I'm using underscore, underscore.string, yaml.js, json2, and xml2json currently and will likely add even more as needed. Underscore was a huge improvement in capability.2.5KViews0likes0CommentsUnderscore.js library
I've added this library in TestComplete with only a few minor tweaks to have it working. In general, I'm finding that adding third party libraries is often pretty easy, as long as the support for the regrettably ancient version of JScript being used by the engine. Anyone else using Underscore or other helpful libraries?6.8KViews0likes16Comments