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

Function create_tkinter_gui

seleniumbase/console_scripts/sb_recorder.py:245–495  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

243
244
245def create_tkinter_gui():
246 default_file_name = "new_recording.py"
247 window = tk.Tk()
248 window.title("SeleniumBase Recorder App")
249 window.geometry("344x560")
250 my_font = ("TkDefaultFont", 11)
251 frame = tk.Frame(window)
252 frame.pack()
253
254 fname = tk.StringVar(value=default_file_name)
255 label = tk.Label(window, text="Enter filename to save recording as:")
256 label.pack(pady=(20, 0.2))
257 entry = tk.Entry(window, textvariable=fname)
258 entry.config(width=22)
259 entry.pack(pady=(0.6, 0.2))
260 cbx = tk.IntVar()
261 chk = tk.Checkbutton(window, text="Overwrite existing files", variable=cbx)
262 chk.pack()
263 chk.select()
264 use_stealth = False
265 use_behave = False
266 use_sb_mgr = False
267 use_sb_cdp = False
268 use_atlas = False
269 command_args = sys.argv[2:]
270 if (
271 "--uc" in command_args
272 or "--cdp" in command_args
273 or "--stealth" in command_args
274 or "--undetected" in command_args
275 or "--undetectable" in command_args
276 ):
277 use_stealth = True
278 if (
279 "--rec-behave" in command_args
280 or "--behave" in command_args
281 or "--gherkin" in command_args
282 ):
283 use_behave = True
284 if "--rec-sb-mgr" in command_args:
285 use_sb_mgr = True
286 if "--rec-sb-cdp" in command_args:
287 use_sb_cdp = True
288 if "--atlas" in command_args:
289 use_atlas = True
290
291 tk.Label(window, text="\nSelect a web browser to use:").pack()
292 br_count = 2
293 br_order = {"chrome": 0, "chromium": 1}
294 options_list = ["Google Chrome"]
295 options_list.append("Chromium Browser")
296 if shared_utils.is_windows():
297 options_list.append("MS Edge (No Stealth)")
298 br_order["edge"] = br_count
299 br_count += 1
300 else:
301 with suppress(Exception):
302 if os.path.exists(detect_b_ver.get_binary_location("edge")):

Callers 1

mainFunction · 0.70

Calls 9

do_recordingFunction · 0.85
do_playbackFunction · 0.85
end_programFunction · 0.85
updateMethod · 0.80
send_window_to_frontFunction · 0.70
selectMethod · 0.45
focusMethod · 0.45
getMethod · 0.45
configureMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…