Forum Discussion
What you are looking at there is not the mapping, it is the object browser. Can you give us a screenshot showing the table object in the object browser with the child objects expanded? It should look something like:
Basically, what I'm suggesting you do is to not use Object Spy or any other way of grabbing the cell directly from the screen but to enter in the code as I showed in my first response. In my example above, my Table has these properties:
Do you have similar properties?
Sure Robert..here's the screenshot. you'll see that here only columnindex would change, and rowIndex would always remain 0
Thank you
Abhi
- tristaanogre8 years agoEsteemed Contributor
Wow... that's a strange looking table where the child objects of the table aren't cells but are panels... that's those extra div tags in the HTML.. really bizzare way of building a table.
In any case, we'll have to look elsewhere for the properties... with the desired cell highlighted, what happens if you go to advanced view (there's a link at the top of the properties panel)? What other properties are available that we could perhaps look for?
- Adagio8 years agoFrequent Contributor
Thank you Robert! I felt the same way about this object. Even after using 'Advanced' it doesn't help. I've to talk with the architects to make it better.
appreciate your help.
Thank you
Abhi
- AlexKaras8 years agoChampion Level 3
Hi Abhi,
My real condolences...
This is a way how Angular works and how developers use it (and how architects design the application) - by default, Angular assigns no identification properties to the generated elements. Sometimes developers may assign some additional value to the web element's class property, but quite often this value is too generic and does not allow unique identification.
Unfortunately, as per my experience, you have only two options:
1) Talk to Development/Architects, explain them why unique identification properties (id or name) are needed for web elements and make this properties be generated;
2) Your only option to find the needed element on the page will be search by displayed text. (Yes, slow, hardly localizable, hardly reusable, etc. but this is Angular and 'modern way' of development.)
P.S. As I wrote in another thread, there is third option - develop some test(s) and go for seek leave for a week or two leaving developers to support your code. I bet that in several days the magic will happen and a lot of (if not all) page elements will get their unique IDs.
P.P.S. To all audience: This given case is an excellent example of why QAs / tests automators *must* participate on the project stage where development tools, technologies and requirements for them are discussed and approved. Been a member of such discussion, you will be able either to influence on the set of tools/technologies, or add the requirements that will make your life easier and improve work results or at least warn the management about risks and ensure that these risks are properly counted.
Related Content
- 2 years ago
- 2 years ago
- 2 years ago