是否有任何开源或付费替代 selenium 来自动化 ext js 应用程序 [英] Is there any open source or paid alternate to selenium for automating ext js application
问题描述
我正在寻找自动化 extjs 应用程序,我们都知道 selenium 不支持 extjs 应用程序.如果您遇到同样的情况,请向我提出建议,并为上述问题提出解决方案.
I am looking to automate extjs application, we all know selenium does not support extjs applications. Kindly suggest me if you have faced the same and come up with a solution for the above.
谢谢,
推荐答案
Sencha 提供他们的测试工具 sencha.com/products/test 或者您可以使用 bryntum.com/products/siesta 或者你仍然可以使用 Selenium 并编写你自己的 API 函数来点击按钮等等 - 这可以很容易地使用 Ext.query
Sencha offers their testing tool sencha.com/products/test or you could use bryntum.com/products/siesta or you can still use Selenium and just write your own API functions for clicking on buttons and such - it can be done quite easily using Ext.query
我可以分享一段我们用来测试非常具体的 ExtJS 项目的 API 代码,在这些项目中我们不能使用 Test/Siesta.代码是用 Python 编写的.
I can share just a piece of our API code we used to test very specific ExtJS project where we could not use Test/Siesta. The code is written in Python.
def ext_component_query_return(self, query, question, target='AppManager'):
script = 'Ext.ComponentQuery.query("{0}")[0]{1}'.format(query, question)
return self.ext_script(script, target=target)
def ext_component_id(self, query, target='AppManager'):
return self.ext_component_query_return(query, '.getId()', target=target)
def ext_component_isVisible(self, query, target='AppManager'):
return self.ext_component_query_return(query, '.isVisible(true)', target=target)
def ext_component_isDisabled(self, query, target='AppManager'):
return self.ext_component_query_return(query, '.isDisabled()', target=target)
例如点击按钮:
s_button_id = self.ext_component_id('#activation-success-card button')
s_button = self.ins.app_manager.find_element_by_id(s_button_id)
s_button.click()
这篇关于是否有任何开源或付费替代 selenium 来自动化 ext js 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!