Selection of Wi-Fi using AppleScript in Big Sur
Solution 1:
It seems I've found the problem. The issue is that the selection of the element, rather than returning "kat", it returns "kat, secure network, 2 bars" and that is why "ends with" or "equals" does not work. To fix that I can use "starts with" but adding a comma after YOUR_SSID_HERE.