Currently when we need a new build form SmartClient we use the 8.1x stream. Almost every time we upgrade, our selenium testcases break, mostly the locators. Are there ongoing changes in the 8.1x stream? Pretty sure this is just bug fix stream but just wanted to double check
Announcement
Collapse
No announcement yet.
X
-
This is indeed the bugfix branch, and we haven't been making changes to the Selenium subsystem recently.
In theory our selenium locators should be stable across minor framework upgrades, as much as possible within your application - if you want to let us know what's been failing for you we can take a look.
At a minimum we'd want to know:
- an example the locator that was working for some specific build, together with an idea of how the component in question is nested within the application
- what the locator looks like for a new build
- what the 2 versions are.
We might need further info but this would probably be enough for us to get an idea of what is unstable and causing these failures for you.
-
We are in a bit of a pickle with our ID generation and would like to start using a more unique approach to it. Unfortunately, if we just change the ID property of the elements, every single Selenium testcase will break. So we thought maybe we could use your own property temporarily to store our new unique ID's. We will have some scripts to record this new property for every element we are using for test cases, save them in a file and do search+replace for ID properties.
Could you suggest if there is an easier way of doing this? We've tried capturing this property in selenium but it cannot find the property. I have been told that AutoTest.js needs to be modified in order to add our own properties. If this is the case, where I can I locate this file?
Comment
-
Sorry I meant "So we thought maybe we could use OUR own property temporarily to store our new unique ID's". Something like _cwID that we store on the elements. We want to record this _cwID property for every selenium testcase we have so that we can later on replace the value we currently have for ID in the testcases with the value that we have stored in _cwID.
We basically want to try to replace our ID value with our new _cwID value without having to manually change (or re-record) our recorded testcases
Comment
-
Still not sure what you have in mind..
You can take your own property and programmatically assign it to ID via an override to init() and doing this.ID = _cwID before calling Super.
Otherwise, if you have your own property that the system is not aware of, it's not going to affect how locators are formed or resolved to elements.
Comment
-
The point is if we currently have testcases such as
//CwDynamicFormExtend[ID="page$content$$content$GridLayout"]/item[name=page%24content%24%24content%24Checkbox||title =%26nbsp%3B||index=2||Class=CheckboxItem]/
and all of a sudden change the ID property to our _cwID, the testcase will break because it will no longer find "page$content$$content$GridLayout". We are trying to figure out a way to slowly move to _cwID without having to re-record all 2000 testcases that we currently have. We are trying to find an automated way of migrating from the old ID values to the new ones that we would like to use instead.
Comment
-
So again, you can't use an arbitrary property like _cwID in a locator.
Either the _cwID becomes the widgets ID or it does not. If it does not become the widget's ID it cannot be used in the locator.
You've never covered what the purpose of changing things around was, but as a general point, you may be able to use ordinary textual search and replace to correct test scripts to your new naming scheme.
Comment
Comment