Hi,
I'm having problem simulating the click event with a more complex view than the one in the MVC example. I have tried querying the button by text, and id. The console.log(btn) shows a valid returned object. But whenever I execute this: t.click(btn), I keep getting this error "getEl() is undefined". In the trial package, I know there's an "025-extjs-mvc" example which does a pretty good job in demonstrating this click event. I also tried adding a few more buttons into that grid panel and simulated the click action, and that worked fine. In my case, where I define my buttons outside of the panel of the view, the waitForCQ seems to be having problem finding the xy coordinates of the DOM-element. No matter which button I've been querying, the click event always happens right at the center of the page. Please help. Thank you!
Support Forum
Here's my view:
and here is my test:
I'm not even testing anything yet. Just wanted to see if button is clicked or not. but I keep getting getEl() is undefined. Thank you!
var mybtn = Ext.create('Ext.button.Button', {
id: 'thebtn',
text: 'myButton'
handler: function(){
var mPanel = Ext.getCmp('myOtherPanel');
mPanel.addCls('bluecolor');
}
});
Ext.define(myApp.view.MainPanel', {
extend: 'Ext.panel.Panel',
alias: 'widget.myMainPanel',
....
});
t.waitForCQ('button[text=myButton]', function(buttons) {
var btn = buttons[0];
t.click(btn, function() {
console.log("button clicked");
);
});
What is your Siesta version? Its visible under the logo starting from 1.0.6 or available as "Siesta.meta.VERSION"
Read the API documentation