Angular 2 Dropdown elements doesnt get selected
This is the Dropdown Element where I can select different Timezones
This is the actual Dropdown Field, that opens, when clicking on the Element above
Now the problem is - this list is implemented with IDs so Europe has the id: TESTID_Europe and so on ...
I mapped the Object with Select_Timezone and a project variable with default TESTID_Europe and I just change it before I select something to TESTID_Africa for example
It perfectly selects Europe / Etc / Australia / Atlantic / Indian / Pacific in the given example - but it wouldnt select Africa for example, because the element has to be right on screen ... which is a little annoying because I wouldnt be able to select Africa in this case right now.
Africa is found in the list on the Top and therefore it doesnt click the item as long as I dont scroll up.
Which wouldnt be a problem if I always know wether to scroll up or down to the item I need - but we have cases where there are 100+ Elements in this dropdown Box ... like Timezone 2 within Europe, there are hundreds of Towns that can be selected
Anyone had this problem before using angular 2 or knows how to make this work?
Solved! Go to Solution.
Since you have the Africa choice mapped, before you attempt the click, call TESTID_Africa.scrollIntoView(true). This will bring the desired object into view. You can then execute your click.
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider