Forum Discussion
How should I work around this and get creative? If it doesnt manage to find the element in the first place to at least have a namemapping of any kind.
Outerhtml and innerhtml doesnt work in this case because it doesnt find the actual element i need only the element above and below.
I tried so many things so far but just can not get it to work ... I was hoping that I can somehow just add the tags I want manually, so it just creates a "custom object" which I can use as an own panel ... or whatever.
But with namemapping not working for this element where I have my special testing ids it really is impossible for me to find anything I can do to actually test it
This is just a suggestion... I haven't tried it but this is the general strategy that I would start with.
Basically, map the basic components of the select (the drop down arrow, the main control for clicking, the panel that displays the choices). Use the "className" property as your mapping for those components so you identify the individual bits.
Then, when you click on the control, you look for the "TextNode" object in the display panel that corresponds with your desired selection using a "FindChild" call. When that object returns, simply execute the "Click()" method on that TextNode to simulate clicking on the desired option.
Write all this in a custom Script function somewhere that you can then call as something like "clickAngularMatSelect" with appropriate parameters for the mapped control and the desired selection object.
- baxatob6 years agoCommunity Hero