This question is locked. New answers and comments are not allowed.
Due to something that our developers do around here that I do not fully understand, there are times within the web page that our element IDs prefix will change from one build to the next. What I am trying to do is be able to scan through the elements within the page and find one that matches a pattern to then define a test ID prefix to then be used throughout the rest of the test for locating and manipulating the test. The method I am attempting is basically:
For each Element in Active Browser
If Element ID contains Mask1
Prefix = Constant1
If Element ID contains Mask2
Prefix = Constant2
But when I enter the code I am shown an error that the Browser does not contain a GetEnumerator definition. I am code savvy enough to be mildly annoying but only self taught so not smart enough to know if there is something that I am supposed to use instead. Does anybody have any suggestions?
Thank you.
For each Element in Active Browser
If Element ID contains Mask1
Prefix = Constant1
If Element ID contains Mask2
Prefix = Constant2
But when I enter the code I am shown an error that the Browser does not contain a GetEnumerator definition. I am code savvy enough to be mildly annoying but only self taught so not smart enough to know if there is something that I am supposed to use instead. Does anybody have any suggestions?
Thank you.