哪个IDE用于Phonegap?(Which IDE for Phonegap? Is Eclipse enough? [closed])
我即将跳入Phonegap并意识到它没有自己的IDE。 我知道我可以使用Eclipse来创建以Android为中心的Phonegap应用程序,但是iOS和Windows Phone以及Blackberry“版本”可以如何使用Eclipse呢? 大多数Phonegappers用作IDE?
PhoneGap Build是否可以在Eclipse中完成所有操作,然后将其置于iOS等的云端,构建?
I am about to jump into Phonegap and realize that it doesn't have an IDE of its own. I know that I could use Eclipse to create Android-centric Phonegap apps, but what about the iOS and perhaps Windows Phone and perhaps Blackberry "versions" - can Eclipse be used for all of it? What do most Phonegappers use as an IDE?
Does PhoneGap Build make it possible to do it all in Eclipse, and then throw it up to the cloud for the iOS, etc., builds?
原文:https://stackoverflow.com/questions/17581330
最满意答案
是。 您可以在赛普拉斯测试中使用JavaScript执行任何操作。 对于上面的html,您可以使用
.invoke()
在赛普拉斯中执行此操作:cy.get('input[test]') .invoke('attr', 'test', 'my new value') .should('have.attr', 'test', 'my new value')
赛普拉斯使用jQuery,所以你可以像这样在jQuery中调用任何函数。 您可以使用
.then()
生成输入后使用纯JavaScript:cy.get('input[test]').then(function($input){ $input[0].setAttribute('test', 'my new value') }) .should('have.attr', 'test', 'my new value')
Yes. Anything you can do in JavaScript is possible within Cypress tests. For the html above, you could do this within Cypress using
.invoke()
:cy.get('input[test]') .invoke('attr', 'test', 'my new value') .should('have.attr', 'test', 'my new value')
Cypress uses jQuery under the hood, so you can invoke any function in jQuery like this. You could alternatively use plain JavaScript after yielding the input using
.then()
:cy.get('input[test]').then(function($input){ $input[0].setAttribute('test', 'my new value') }) .should('have.attr', 'test', 'my new value')
相关问答
更多-
设置属性没有值(Set attribute without value)[2023-09-04]
attr()函数也是一个setter函数。 你可以传递一个空字符串。 $('body').attr('data-body',''); 空字符串将简单地创建没有值的属性。 参考 - http://api.jquery.com/attr/#attr-attributeName-value attr(attributeName,value) The attr() function is also a setter function. You can just pass it ... -
赛普拉斯:设置属性值(Cypress: set attribute value)[2023-08-04]
是。 您可以在赛普拉斯测试中使用JavaScript执行任何操作。 对于上面的html,您可以使用.invoke()在赛普拉斯中执行此操作: cy.get('input[test]') .invoke('attr', 'test', 'my new value') .should('have.attr', 'test', 'my new value') 赛普拉斯使用jQuery,所以你可以像这样在jQuery中调用任何函数。 您可以使用.then()生成输入后使用纯JavaScript: cy.g ... -
不,赛普拉斯在每次测试前都没有清除浏览器缓存。 赛普拉斯尊重服务器的缓存头。 因此,如果设置它们,浏览器将缓存这些文件。 这并没有真正记录在任何地方,但我是赛普拉斯的开发人员,所以知道它是如何工作的。 如果您想看到一些不同的行为,我建议在OS赛普拉斯项目上打开一个问题 。 EDIT: Cypress automatically clears browser cache before the browser launches in Version 0.20.0. So, the cache will be c ...
-
你应该使用twitter_url= “setter”方法,所以这应该工作: send(:twitter_url=, result) 关于您的编辑,您至少可以做两件事: 第一种方法: send("#{argument}=", result) 第二种方法,使用write_attribute : write_attribute(argument, result) You should use twitter_url= "setter" method, so this should work: send(:t ...
-
我认为你不应该在特征中“过滤”你的照片集。 相反,你应该只“建立”你需要的东西。 trait :non_broken do # build non_broken photos only end Add additional ignored attribute to factory and use it to access photos in trait: factory :photo_gallery do ignore do temp_photos { PhotosGenerator.ge ...
-
设置form: false时测试有效form: false 。 it.only('PUTs a request', () => { const url = 'http://localhost:3000/mythings/2' cy.request({ method: 'PUT', url: url, form: false, body: { name: 'Name', subjects: [] } } ...
-
是的你可以! 将force404选项传递给cy.server : cy.server({force404: true}) cy.route('**/user/jake', {user:{name:'Jake'}) cy.visit('/') // your test code here 然后,任何XHR请求/user/jake将工作,但/user/jane和/login例如,将404 Yes you can! Pass the force404 option to cy.server: cy.serve ...
-
你可以轻松前往 cy .get('.hello') .should('not.exist'); 为我工作就好了。 但是,您需要注意这种命令的时间安排。 例如,如果在页面加载后立即执行此命令,它可能会给您一个误报,因为该元素尚未加载,因此在DOM中不存在。 对我来说,最好的做法是在我确定已加载的东西上执行额外的cy.get ,或在另一个元素不存在时执行.should('be.visible') 。 例如,如果你有一个模型接收一个输入,然后在提交输入后消失,我会断言页面的可见性低于模态,如下所示: c ...
-
cy.request()向指定的url发出一个实际的HTTP请求。 这个命令应该用在你不想加载你的实际应用程序的情况下。 例如,您可能想要检查服务器上的端点。 cy.route()用于处理正在测试的应用程序中发出的HTTP请求。 如果您希望对正在测试的应用程序中正在进行的HTTP请求做出响应,那么您可能需要使用cy.route()和.wait() 。 例如,为了确保当我们访问我们的应用程序时,我们的应用程序向/dummypath发出GET请求,并且对这个请求的响应是我们的存根{} ,我们会写: descri ...
-
赛普拉斯尚不支持测试文件输入元素。 测试文件输入的唯一方法是: 发布原生事件(赛普拉斯在其路线图中有此事件)。 了解应用程序如何使用File API处理文件上载,然后将其存根。 它可能但不够通用,无法提供任何具体的建议。 有关详细信息,请参阅此公开问题 。 Testing File Input elements is not yet supported in Cypress. The only way to test File Inputs is to: Issue native events (which ...