MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / optimize_selector

Function optimize_selector

seleniumbase/console_scripts/sb_objectify.py:202–210  ·  view source on GitHub ↗
(selector)

Source from the content-addressed store, hash-verified

200
201
202def optimize_selector(selector):
203 if (len(selector) > 2 and selector[0] == "'") and (
204 selector[-1] == "'" and '"' not in selector[1:-1]
205 ):
206 selector = '"' + selector[1:-1] + '"'
207 if "\\[" in selector or "\\]" in selector or "\\." in selector:
208 if selector[0] != "r":
209 selector = "r" + selector
210 return selector
211
212
213def get_next_var_name(existing_names):

Callers 2

process_test_fileFunction · 0.70
mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…