开发者

Using jQuery in Apple Instruments, UI Test Automation

开发者 https://www.devze.com 2023-01-13 11:25 出处:网络
Is there a way to use jquery when scripting in Apples UI Test Automation. When, in Intruments,I try: #import \"jquery-1.4.2.js\"

Is there a way to use jquery when scripting in Apples UI Test Automation. When, in Intruments, I try:

#import "jquery-1.4.2.js"

I get a warning regarding undefined object window, which is expected since there are no window objects defined, like it would have been in a browser.

But, when I try the same on the Rhino JavaScript engine, using the EnvJs it works like a charm:

$ js
Rhino 1.7 release 2 2010 01 20
js> load('env.rhino.1.2.js')
[  Envjs/1.6 (Rhino; U; Linux amd64 2.6.32-24-generic; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]
js> load('jquery-1.4.2.js') 
js> jQuery

function (selector, context) {
    return new jQuery.fn.init(selector, context);
}

js> 

Is there a way to do the s开发者_开发百科ame in Apples JavaScript engine in Instruments UI Test Automation?

/Kristian'

PS: What I try to accomplish using jquery, is to make SOAP client requests using the AJAX api in jquery. DS

0

精彩评论

暂无评论...
验证码 换一张
取 消