Thanks Sanjiv
Thanks Sanjiv. Will play with it and keep you guys posted about how things match from selenium to the QTP world.
Announcement
Collapse
No announcement yet.
X
-
Selenium support has been added to Smart GWT. The user guide and Selenium extensions can be found under the "selenium" subdirectory in the SmartGWT distribution zip file. This will appear in the next nightly build.
Sanjiv
Leave a comment:
-
We already told you that this functionality will be added to SVN shortly. If you need additional support more immediately, get a support plan.
Leave a comment:
-
Update again............clicks on one node up
Ok, so i was a little impatient.
Here is what is happening: Locator returns the following:
Code:"//TreeGrid[ID="isc_OID_13"]/body/row[name=Miller Columns||4]/col[fieldName=name||0]"
ClientY is 0x97
and it clicks the node just above the Miller Column or whatever i select. Anything i missed?
Well the great news is that it is consistent, i can actually click on the correct node if i fudge the y coordinate, but i am sure you guys will let us know what is missing and why its returning the wrong element.Last edited by abhisec; 2 Apr 2010, 09:37.
Leave a comment:
-
Holding off
Well looks like we are following the same path and it might make sense for us to hold off. I am hoping this is days and not weeks as you guys are pretty awesome about updates.
Leave a comment:
-
You need to pass the coordinates of the element to the mouseDown, mouseUp and click events in order to properly trigger the event on the canvas.
Code:var clientX = isc.Element.getElementRect(element)[0]; var clientY = isc.Element.getElementRect(element)[1];
Leave a comment:
-
I did add dom events
That's exactly what i tried to do. Unfortunately it doesn't like them. So i am probably doing something wrong. I am trying to click the tree nodes in the navigation section.
What i have tried is creating a new event object and fireEvent. I tried click and mouseDown, mouseUp and Click sequence but none of them seemed to work.
Anyways, thanks for the reply, is there a way i can get my hands on the code before it hits the svn :). If not when can we expect this to hit the svn?
Leave a comment:
-
You need to trigger DOM events on the DOM element itself. We already have code that does exactly this for Selenium support so if you can wait until this gets added to SVN, you can simply adopt the code pretty much as-is for QTP support. The code for Selenium support will hit SVN soon.
Leave a comment:
-
How do we trigger events on the canvas
If we get the canvas, can we still fire click events on this? So for example we get the dom element for the tree node, and then add the call to get the canvas, will ISC EventHandler handleClick propagate the click event correctly?
Leave a comment:
-
AutoTest.getElement() returns the DOM element. To get the SmartClient Canvas corresponding to this element call
Code:var canvas = isc.AutoTest.locateCanvasFromDOMElement(element);
Leave a comment:
-
bump......
anyone got any ideas about AutoTest.getElement element type? is it supposed to return smartclient component reference? if so why are this elements not responding to events?
Leave a comment:
-
What is getElement supposed to return?
After i get the element using the locator what is returned? Is it a reference to actual smart client widget entity on which we can call functions and simulate some of the actions programmatically? It doesn't look like i am getting a smartclient reference back.
Sanjiv or Isomorphic do you have any ideas or pointers? Also, how to go about getting simple click events to be fired on these widgets as event fires don't work. Do i need to use isc eventhandler?Last edited by abhisec; 1 Apr 2010, 19:03.
Leave a comment:
-
body._suppressEventHandling is not defined
I am further along where it is able to get correct locator and row num, col num for miller columns etc, but it blows up on this line
Code:if (body._suppressEventHandling()) return null;
Code:// Override getInnerElementFromSplitLocator to handle cells in the body/frozenBody getInnerElementFromSplitLocator : function (locatorArray) { if (this.emptyLocatorArray(locatorArray)) return this.getHandle(); // expected format: "frozenBody", row[...], col[...]" var body = locatorArray[0]; if (locatorArray.length == 3 && (body == "body" || body == "frozenBody")) { // Start with the field! var colLocator = locatorArray[2], colLocatorConfig = isc.AutoTest.parseLocatorFallbackPath(colLocator); // colLocatorConfig will have name:"col", config:{config object} // The 'getChildFromLocatorSubstring() method already checks for this but // as a sanity check verify the name of the col locator if (colLocatorConfig.name != "col") { this.logWarn("Error parsing locator:" + locatorArray.join("") + " returning ListGrid handle"); return this.getHandle(); } var field = this.getFieldFromColLocatorConfig(colLocatorConfig.config), localColNum; // If no fieldName stored, use the previous colNum instead // [we stored the colNum relative to the body in question] if (field == null) { localColNum = parseInt(colLocatorConfig.config[isc.AutoTest.fallback_valueOnlyField]); if (body == "frozenBody" && this.frozenBody == null) { body = "body"; } // convert to string to a pointer to the widget body = this[body]; } else { localColNum = this.getLocalFieldNum(this.getFieldNum(field)); if (this.fieldIsFrozen(field)) body = this.frozenBody; else body = this.body; } // At this point we know what body it's in and what the colNum is within that // body. // Now find the row var rowLocator = locatorArray[1], rowLocatorConfig = isc.AutoTest.parseLocatorFallbackPath(rowLocator), rowNum = this.getRowNumFromLocatorConfig(rowLocatorConfig.config); if (isc.isA.Number(rowNum) && isc.isA.Number(localColNum)) { // We suppress all events on row/cols during row animation // in this case suppress the element entirely so auto-test engines // don't attempt to fire events on them. if (body._suppressEventHandling()) return null; return body.getTableElement(rowNum, localColNum); } } return this.Super("getInnerElementFromSplitLocator", arguments); }
Leave a comment:
-
locator.add was the problem
This is the locator i am getting after changing the array add to push:
It's now blowing up on getElement for string functions on locator, fixing that now. Will keep you guys posted, thanks for the help so far
Code:"//ColumnTree[ID="isc_OID_60"]/member[Class=ListGrid||index=0||length=1||classIndex=0||classLength=1||roleIndex=0||roleLength=1||scRole=list]/body/row[0]/col[0]"
Leave a comment:
-
Updated to latest nightly now getting a different error
I think the problem was with the autotest which i was using, it was from smartclient 7.1 i believe.
Here is what i get when I am trying to use the same element which sanjiv used (Miller Column column2 row 0) and with the latest nightly build, it now blows up in
Code:locator.add(field + this.fallback_equalMarker + config[field]);
Code:createLocatorFallbackPath: function(name, config) { var locator = []; for (var field in config) { if (field == this.fallback_valueOnlyField) { locator.add(config[field]); } else { debugger; locator.add(field + this.fallback_equalMarker + config[field]); } } return name + this.fallback_startMarker + locator.join(this.fallback_separator) + this.fallback_endMarker; }
Leave a comment:
Leave a comment: