Hi, I’m trying to map a selector, and I would like to know if it’s possible to use a regex to find this.
No, sorry.
Note, for selectors for browsers. If you are using xpath, then at some point you might be able to, once chrome decided to use xpath v2. Then you can use matches() but right now, that is not possible.
But you can use wildcard for either any amount of characters ( * ) or a single character ( ? )
Allan, thanks a lot…
But now I’m trying to map a path in SAP, and it changes sometimes:
“wnd[0]/usr/subSUB0:SAPLMEGUI:0016/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell”
“wnd[0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell”
If you analyze it, the only change is “0016” → “0013”. This part, I would like it to be dynamic ( ???). Is it possible?
oh … I have only testet that on windows/java and browsers, I’m not 100% sure it will work in SAP.
But try changing it to 00?
If not, then use 2 get elements, one for each select and set MinResults to 0, save the result ( Elements in the property grid ) and check then length of each array to se witch one, found something
To map this, I could only do it using the “invoke method.”
Allan, it works! I did get the element with a minimum value of 0, and I created a regex with an expression
After this, I declared a variable for the selector and used it (GET Element and in Invoke Method).
Thank you very much!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.