java - ExtJs dynamic Id generation when using Selenium Tool -
I am trying to test a web application which uses the UI using EXTJS. The problem I am facing is that when I try to record macro and automate the test, then I have a big problem.
-
ExtJs IDs are dynamic (the next time I try to play the record macro when I record the macro ID the ID is not the same)
-
So I get a run time exception and the macro does not have complete execution. Tried the solution:
I tried an alternative test tool for semitium and faced the same problem. Done
As far as I understand, there should be no way to stabilize this ID so that the problem can be solved or there is some work available.
We use the following overrides for ext (see 2.2.1) Also gives the extension, whatever we specify instead, it is not certain where we met it, possibly due to the Ex Forum
Ext.override (Ext.Button, {initButtonEl: function (BTN, BTNEL) {this.el = btn; btn.addClass "X-btn"); If (this.id) {//this.el.dom.id = this.el.id = this.id; // override btnEl.dom.id = btnEl.id = this.id; // and override} if (this.icon) {btnEl.setStyle ('background-image', 'url (' + this.icon + ')');} if (this.iconCls) {btnEl.addClass (this. InonCls); If (! This.cls) {btn.addClass (this.text? 'X-btn-text-icon': 'x-btn-icon');}} If (this.tabIndex! == undefined) {BtnEl. Dom.tabIndex = this.taboltip;} if (this.tooltip) {if (this type.tooltip == 'type of object') {Ext.QuickTips.register (Ext.apply ({Target: btnEl.id}, This .tooltip));} and {btnEl.dom [this.tooltipType] = this.tooltip;}} if (this is pressed) {this.el.addClass ("x-btn-pressed");} (if This.handleMouseEvents) {BT.N.On ("mouseover", this. Low house, this); // new functionality for document level monitoring //btn.on(mmouseout ", this.onMouseOut, this); btn.on (" mosudown ", it. Commausedown, it);} if (this.menu) {this .menu.on ("show", this.onMenuShow, this); This.menu.on ("hide", it. Manhehud, it);} if (this.repeat) {var repeater = new Ext.util.ClickRepeater (BTN, type this.repeat == "object"? This.repeat: {}); Repeater.on ("click", this.onClick, this);} btn.on (click itclick event, click it Do, it);}}); ext.override (ext.menu.item, {onRender: function (container, position) {var el = document.createElement ("a"); el.hideFocus = true; el.unselectable = "On" el.href = This.href = "#"; If (this.hrefTarget) {el.target = this.hrefTarget;} el.className = this.itemCls + (this.main? "X-menu-item-arrow": "") + (This.cls? "" + This.cls: ""); // override if (this.id) {el.id = this.id;} // end override el.innerHTML = String.format ('& lt; img src = "{0 } "Class =" x-menu-item-icon {2} "/> {1} ', this.icon || Ext.BLANK_IMAGE_URL, this.team text || This.text, This.iconCls || ''); This.el = el; Ext.menu.Item.superclass.onRender.call (this, container, position);}});
Comments
Post a Comment