Closed Ashish3080 closed 5 months ago
For a JSON file (instead of an SB-runnable Python script), record your script with the Chrome DevTools Recorder (included with Chrome). To reach it, View
-> Developer
-> Developer Tools
. Or Right-Click
-> Inspect
.
Alternatively, you could create your own Python script that parses out the items from an existing SB Python file into JSON, but it's probably much easier to just use the built-in Chrome DevTools Recorder, which has an option to export recordings into JSON. If the Chrome Recorder tab isn't visible by default, you may need to click a checkbox from the configuration/settings section.
Is there a way to stop the recording other than entering 'c' on the terminal. Like a shortcut key like 'esc'?
@Ashish3080 That's a Python breakpoint()
. c
+ Enter
to continue, but you can check the Python docs for more.
Hi, I am using seleniumbase to record actions on my browser. It works fine and generates a script having all the steps followed during the recording. I want to export all the actions and the subsequent element id/URL/texts into a json file. How can I do that? I am using sbase mkrec new_test_1.py --url=imdb.com to create test files to test the recordings