Red Hat Bugzilla – Full Text Bug Listing
|Summary:||scLocators w/ parent/child relationship defined|
|Product:||[Other] RHQ Project||Reporter:||dgao|
|Component:||Core UI||Assignee:||Simeon Pinder <spinder>|
|Status:||CLOSED CURRENTRELEASE||QA Contact:||dgao|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2013-09-02 03:20:30 EDT||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:|
Description dgao 2010-11-16 14:40:13 EST
scLocator ids does not follow the xpath syntax of /parent/child, as a result it's making it difficult to create any form on element hierarchy in the automation code. Would it be possible to have a consistent way to identify parent element and its relationship with its children in the sclocator itself? Example: (this is the general form used to create an inventory) scLocator=//DynamicForm[ID=\"LocatableDynamicForm?_GroupCreate\"]/item[name=nametitle=Nameindex=0Class=TextItem?]/element (this is the next button that's inside the form) scLocator=//IButton[ID=\"LocatableIButton_Next\"]/ Would it be possible to produce an scLocator scLocator=//DynamicForm[ID=\"LocatableDynamicForm?_GroupCreate\"]/IButton[ID=\"LocatableIButton_Next\"]/ instead?
Comment 1 Charles Crouch 2010-12-07 14:04:27 EST
Comment 2 Charles Crouch 2010-12-07 14:11:06 EST
Next step is to make sure dgao is setup with Selenium IDE or Smart GWT Developer console (http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/docs/Debugging.html). With those he should be able to determine whether the locators are being create appropriate, e.g. //ListGrid[ID="itemList"]/body/row[itemID=1996||itemName=Sugar||2]/col[fieldName=SKU||1] (from http://www.jroller.com/sjivan/entry/smart_gwt_2_2_released) David Gao, please reach out to Simeon on your return next week.
Comment 3 Simeon Pinder 2010-12-20 10:49:53 EST
so looking at that, what if the scLocator=//IButton[ID=\"LocatableIButton_Next\"]/ ... was instead something like scLocator=//IButton[ID=\" LocatableDynamicForm?_GroupCreate_LocatableIButton_Next\"]/ which correctly included the parent hierarchy? Does this help better define the repeatable hierarchical naming for QE's needs?
Comment 4 dgao 2010-12-21 16:06:03 EST
This is fine as long as it's possible to drill down from element to element multiple times. Another word, if it's feasible to construct something like: scLocator=//IButton[ID=\"LocatableDynamicForm[ID=\"InventoryPanel\"]?_GroupCreate_LocatableIButton_Next\"]/ While the ordering of element is confusing, the above scLocator will prove the ability to go from element to element to element. Once this feature is in place, it should be easy for QE to construct locator strategy to identify and perform actions on elements in the UI.
Comment 5 Simeon Pinder 2011-01-06 09:31:28 EST
Started looking into what it will take to put more hierarchy information into the scLocator ids for the example provided. Will update case notes after connecting with Jay Shaughnessy.
Comment 6 Simeon Pinder 2011-01-07 13:57:59 EST
Fixed numerous scLocator hierarchy issues with the following two commits to master available in successful builds >= 937: 62953e448515945c0dcb660ed46e67bdd0f6a617 cc05acd3b90f8f437977cf3eff1743978b00f7b2 The parent identifier should be reliably inserted into child buttons(ex. Next, Cancel,etc). David you will notice that some of the identifiers will have changed because of this change. The scLocator mechanism is the suggested approach of reliably identifying elements. XPath and related concatenation searches has been deemed unreliably brittle with the SmartGwt components. Please test out and comment on whether these changes provide QE with the reliable hierarchical naming that you were interested in or with more specific use cases where the current scLocator strategy is deemed insufficient.
Comment 7 Mike Foley 2011-04-18 08:27:27 EDT
spoke with dgao on 4/15 on this. the current solution is not ideal, but qa is not blocked. i will open new bugs on specific testability issues with selenium and the scLocators.
Comment 8 Heiko W. Rupp 2013-09-02 03:20:30 EDT
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.