简体   繁体   English

访问由extjs动态创建的元素

[英]Access elements created dynamically by extjs

I'm using Firefox 41.0 along with Selenium 2.47.3 webdriver. 我正在使用Firefox 41.0和Selenium 2.47.3 webdriver。 Our application is developed in ExtJS and we are getting some dynamic buttons upon clicking certain elements. 我们的应用程序是用ExtJS开发的,单击某些元素后会得到一些动态按钮。

My webdriver is unable to access this element. 我的webdriver无法访问此元素。 So, I'm trying to execute a javascript module within python webdriver call. 所以,我试图在python webdriver调用内执行一个javascript模块。

I'm unable to access the element which dynamically gets loaded on web page. 我无法访问动态加载到网页上的元素。

How to access these kind of elements. 如何访问此类元素。 The button click is supposed to bring a popup defined in the dynamic content. 单击按钮应该带来一个在动态内容中定义的弹出窗口。

Dynamic elements generated by ExtJS thorough an ajax call: ExtJS通过ajax调用生成的动态元素:

在此处输入图片说明

Failing while trying to execute click on this element from javascript: 尝试执行失败,但从javascript中单击此元素:

在此处输入图片说明

You should try to get component with Ext. 您应该尝试使用Ext获得组件。

Example: 例:

Ext.getCmp('id').fireEvent('click');

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM