Is there any open source or paid alternate to selenium for automating ext js application

后端 未结 1 2081
南笙
南笙 2020-12-22 13:45

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 solutio

相关标签:
1条回答
  • 2020-12-22 13:59

    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

    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)
    

    Here is for example clicking on the button:

    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()
    
    0 讨论(0)
提交回复
热议问题