I've tried working with Selenium IDE to test our SmartGWT application. Many of the elements don't have a set ID so the scLocators can be pretty long and not robust for changes in the layout.
For example the following scLocator was generated for a text field in a dynamic form:
Notice how the selector contains tons of HLayouts and VLayouts. I tried reducing it to
but it doesn't work. No element is found with that selector.
What is the best approach here except for setting an ID?
I've also noticed that using // in the middle of the scLocator doesn't seem to work. Whenever I want to check if a certain type of element is not present I have to use the normal XPath expressions.
The application is running with SmartGWT 4.1 and so are the user-extensions.js and user-extensions-ide.js.
For example the following scLocator was generated for a text field in a dynamic form:
Code:
scLocator=//Window[ID="FeverchartSearchIncludingAlternativesWindow"]/item[0][Class="VLayout"]/member[Class=HLayout||index=0||length=3||classIndex=0||classLength=3]/member[Class=DynamicForm||index=0||length=2||classIndex=0||classLength=1]/item[name=searchTextItem||title=Suchtext||index=0||Class=TextItem]/element
Code:
scLocator=//DynamicForm/item[name=searchTextItem||title=Suchtext||index=0||Class=TextItem]/element
What is the best approach here except for setting an ID?
I've also noticed that using // in the middle of the scLocator doesn't seem to work. Whenever I want to check if a certain type of element is not present I have to use the normal XPath expressions.
The application is running with SmartGWT 4.1 and so are the user-extensions.js and user-extensions-ide.js.
Comment