seleniumbase 4.24.11__py3-none-any.whl → 4.33.15__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. sbase/__init__.py +1 -0
  2. sbase/steps.py +7 -0
  3. seleniumbase/__init__.py +16 -7
  4. seleniumbase/__version__.py +1 -1
  5. seleniumbase/behave/behave_sb.py +97 -32
  6. seleniumbase/common/decorators.py +16 -7
  7. seleniumbase/config/proxy_list.py +3 -3
  8. seleniumbase/config/settings.py +4 -0
  9. seleniumbase/console_scripts/logo_helper.py +47 -8
  10. seleniumbase/console_scripts/run.py +345 -335
  11. seleniumbase/console_scripts/sb_behave_gui.py +5 -12
  12. seleniumbase/console_scripts/sb_caseplans.py +6 -13
  13. seleniumbase/console_scripts/sb_commander.py +5 -12
  14. seleniumbase/console_scripts/sb_install.py +62 -54
  15. seleniumbase/console_scripts/sb_mkchart.py +13 -20
  16. seleniumbase/console_scripts/sb_mkdir.py +11 -17
  17. seleniumbase/console_scripts/sb_mkfile.py +69 -43
  18. seleniumbase/console_scripts/sb_mkpres.py +13 -20
  19. seleniumbase/console_scripts/sb_mkrec.py +88 -21
  20. seleniumbase/console_scripts/sb_objectify.py +30 -30
  21. seleniumbase/console_scripts/sb_print.py +5 -12
  22. seleniumbase/console_scripts/sb_recorder.py +16 -11
  23. seleniumbase/core/browser_launcher.py +1658 -221
  24. seleniumbase/core/log_helper.py +42 -27
  25. seleniumbase/core/mysql.py +1 -4
  26. seleniumbase/core/proxy_helper.py +35 -30
  27. seleniumbase/core/recorder_helper.py +24 -5
  28. seleniumbase/core/sb_cdp.py +1951 -0
  29. seleniumbase/core/sb_driver.py +162 -8
  30. seleniumbase/core/settings_parser.py +6 -0
  31. seleniumbase/core/style_sheet.py +10 -0
  32. seleniumbase/extensions/recorder.zip +0 -0
  33. seleniumbase/fixtures/base_case.py +1225 -614
  34. seleniumbase/fixtures/constants.py +10 -1
  35. seleniumbase/fixtures/js_utils.py +171 -144
  36. seleniumbase/fixtures/page_actions.py +177 -13
  37. seleniumbase/fixtures/page_utils.py +25 -53
  38. seleniumbase/fixtures/shared_utils.py +97 -11
  39. seleniumbase/js_code/active_css_js.py +1 -1
  40. seleniumbase/js_code/recorder_js.py +1 -1
  41. seleniumbase/plugins/base_plugin.py +2 -3
  42. seleniumbase/plugins/driver_manager.py +340 -65
  43. seleniumbase/plugins/pytest_plugin.py +276 -47
  44. seleniumbase/plugins/sb_manager.py +412 -99
  45. seleniumbase/plugins/selenium_plugin.py +122 -17
  46. seleniumbase/translate/translator.py +0 -7
  47. seleniumbase/undetected/__init__.py +59 -52
  48. seleniumbase/undetected/cdp.py +0 -1
  49. seleniumbase/undetected/cdp_driver/__init__.py +1 -0
  50. seleniumbase/undetected/cdp_driver/_contradict.py +110 -0
  51. seleniumbase/undetected/cdp_driver/browser.py +829 -0
  52. seleniumbase/undetected/cdp_driver/cdp_util.py +458 -0
  53. seleniumbase/undetected/cdp_driver/config.py +334 -0
  54. seleniumbase/undetected/cdp_driver/connection.py +639 -0
  55. seleniumbase/undetected/cdp_driver/element.py +1168 -0
  56. seleniumbase/undetected/cdp_driver/tab.py +1323 -0
  57. seleniumbase/undetected/dprocess.py +4 -7
  58. seleniumbase/undetected/options.py +6 -8
  59. seleniumbase/undetected/patcher.py +11 -13
  60. seleniumbase/undetected/reactor.py +0 -1
  61. seleniumbase/undetected/webelement.py +16 -3
  62. {seleniumbase-4.24.11.dist-info → seleniumbase-4.33.15.dist-info}/LICENSE +1 -1
  63. {seleniumbase-4.24.11.dist-info → seleniumbase-4.33.15.dist-info}/METADATA +299 -252
  64. {seleniumbase-4.24.11.dist-info → seleniumbase-4.33.15.dist-info}/RECORD +67 -69
  65. {seleniumbase-4.24.11.dist-info → seleniumbase-4.33.15.dist-info}/WHEEL +1 -1
  66. sbase/ReadMe.txt +0 -2
  67. seleniumbase/ReadMe.md +0 -25
  68. seleniumbase/common/ReadMe.md +0 -71
  69. seleniumbase/console_scripts/ReadMe.md +0 -731
  70. seleniumbase/drivers/ReadMe.md +0 -27
  71. seleniumbase/extensions/ReadMe.md +0 -12
  72. seleniumbase/masterqa/ReadMe.md +0 -61
  73. seleniumbase/resources/ReadMe.md +0 -31
  74. seleniumbase/resources/favicon.ico +0 -0
  75. seleniumbase/utilities/selenium_grid/ReadMe.md +0 -84
  76. seleniumbase/utilities/selenium_ide/ReadMe.md +0 -111
  77. {seleniumbase-4.24.11.dist-info → seleniumbase-4.33.15.dist-info}/entry_points.txt +0 -0
  78. {seleniumbase-4.24.11.dist-info → seleniumbase-4.33.15.dist-info}/top_level.txt +0 -0
@@ -1,731 +0,0 @@
1
- <!-- SeleniumBase Docs -->
2
-
3
- ## [<img src="https://seleniumbase.github.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) Console Scripts 🌠
4
-
5
- 🌟 SeleniumBase console scripts can do many things, such as downloading web drivers, creating test directories with config files, activating the SeleniumBase Recorder, launching the SeleniumBase Commander, translating tests into other languages, running a Selenium Grid, and more.
6
-
7
- * Usage: ``seleniumbase [COMMAND] [PARAMETERS]``
8
-
9
- * (simplified): ``sbase [COMMAND] [PARAMETERS]``
10
-
11
- * To list all commands: ``seleniumbase --help``
12
-
13
- (<i>For running tests, [use <b>pytest</b> with SeleniumBase](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md).</i>)
14
-
15
- ```bash
16
- COMMANDS:
17
- get / install [DRIVER] [OPTIONS]
18
- methods (List common Python methods)
19
- options (List common pytest options)
20
- behave-options (List common behave options)
21
- gui / commander [OPTIONAL PATH or TEST FILE]
22
- behave-gui (SBase Commander for Behave)
23
- caseplans [OPTIONAL PATH or TEST FILE]
24
- mkdir [DIRECTORY] [OPTIONS]
25
- mkfile [FILE.py] [OPTIONS]
26
- mkrec / codegen [FILE.py] [OPTIONS]
27
- recorder (Open Recorder Desktop App.)
28
- record (If args: mkrec. Else: App.)
29
- mkpres [FILE.py] [LANG]
30
- mkchart [FILE.py] [LANG]
31
- print [FILE] [OPTIONS]
32
- translate [SB_FILE.py] [LANG] [ACTION]
33
- convert [WEBDRIVER_UNITTEST_FILE.py]
34
- extract-objects [SB_FILE.py]
35
- inject-objects [SB_FILE.py] [OPTIONS]
36
- objectify [SB_FILE.py] [OPTIONS]
37
- revert-objects [SB_FILE.py] [OPTIONS]
38
- encrypt / obfuscate
39
- decrypt / unobfuscate
40
- proxy (Start a basic proxy server)
41
- download server (Get Selenium Grid JAR file)
42
- grid-hub [start|stop] [OPTIONS]
43
- grid-node [start|stop] --hub=[HOST/IP]
44
- * (EXAMPLE: "sbase get chromedriver") *
45
-
46
- Type "sbase help [COMMAND]" for specific command info.
47
- For info on all commands, type: "seleniumbase --help".
48
- Use "pytest" for running tests.
49
- ```
50
-
51
- <h3>get / install</h3>
52
-
53
- * Usage:
54
-
55
- ```bash
56
- sbase get [DRIVER] [OPTIONS]
57
- sbase install [DRIVER] [OPTIONS]
58
- ```
59
-
60
- * Examples:
61
-
62
- ```bash
63
- sbase get chromedriver
64
- sbase get geckodriver
65
- sbase get edgedriver
66
- sbase get chromedriver 114
67
- sbase get chromedriver 114.0.5735.90
68
- sbase get chromedriver stable
69
- sbase get chromedriver beta
70
- sbase get chromedriver -p
71
- ```
72
-
73
- (Drivers: ``chromedriver``, ``geckodriver``, ``edgedriver``,
74
- ``iedriver``, ``uc_driver``)
75
-
76
- (Options: A specific driver version or major version integer.
77
- If not set, the driver version matches the browser.
78
- ``-p`` / ``--path``: Also copy to "/usr/local/bin".)
79
-
80
- * Output:
81
-
82
- Downloads the webdriver to ``seleniumbase/drivers/``
83
- (``chromedriver`` is required for Chrome automation)
84
- (``geckodriver`` is required for Firefox automation)
85
- (``edgedriver`` is required for MS__Edge automation)
86
-
87
- <h3>methods</h3>
88
-
89
- * Usage:
90
-
91
- ```bash
92
- sbase methods
93
- ```
94
-
95
- * Output:
96
-
97
- Displays common SeleniumBase Python methods.
98
-
99
- <h3>options</h3>
100
-
101
- * Usage:
102
-
103
- ```bash
104
- sbase options
105
- ```
106
-
107
- * Output:
108
-
109
- Displays common pytest command-line options
110
- that are available when using SeleniumBase.
111
-
112
- ```bash
113
- --browser=BROWSER (The web browser to use. Default is "chrome")
114
- --edge / --firefox / --safari (Shortcut for browser selection.)
115
- --headless (Run tests headlessly. Default mode on Linux OS.)
116
- --demo (Slow down and visually see test actions as they occur.)
117
- --slow (Slow down the automation. Faster than using Demo Mode.)
118
- --rs / --reuse-session (Reuse browser session between tests.)
119
- --crumbs (Clear all cookies between tests reusing a session.)
120
- --maximize (Start tests with the web browser window maximized.)
121
- --dashboard (Enable SeleniumBase\'s Dashboard at dashboard.html)
122
- --incognito (Enable Chromium\'s Incognito mode.)
123
- --guest (Enable Chromium\'s Guest Mode.)
124
- --dark (Enable Chromium\'s Dark Mode.)
125
- --uc (Use undetected-chromedriver to evade detection.)
126
- -m=MARKER (Run tests with the specified pytest marker.)
127
- -n=NUM (Multithread the tests using that many threads.)
128
- -v (Verbose mode. Print the full names of each test run.)
129
- --html=report.html (Create a detailed pytest-html report.)
130
- --collect-only / --co (Only show discovered tests. No run.)
131
- --co -q (Only show full names of discovered tests. No run.)
132
- -x (Stop running tests after the first failure is reached.)
133
- --pdb (Enter the Post Mortem Debug Mode after any test fails.)
134
- --trace (Enter Debug Mode immediately after starting any test.)
135
- | Debug Mode Commands >>> help / h: List all commands. |
136
- | n: Next line of method. s: Step through. c: Continue. |
137
- | return / r: Run until method returns. j: Jump to line. |
138
- | where / w: Show stack spot. u: Up stack. d: Down stack. |
139
- | longlist / ll: See code. dir(): List namespace objects. |
140
- --help / -h (Display list of all available pytest options.)
141
- --final-debug (Enter Final Debug Mode after each test ends.)
142
- --recorder / --rec (Save browser actions as Python scripts.)
143
- --rec-behave / --rec-gherkin (Save actions as Gherkin code.)
144
- --rec-print (Display recorded scripts when they are created.)
145
- --save-screenshot (Save a screenshot at the end of each test.)
146
- --archive-logs (Archive old log files instead of deleting them.)
147
- --check-js (Check for JavaScript errors after page loads.)
148
- --start-page=URL (The browser start page when tests begin.)
149
- --agent=STRING (Modify the web browser\'s User-Agent string.)
150
- --mobile (Use Chromium\'s mobile device emulator during tests.)
151
- --metrics=STRING (Set mobile "CSSWidth,CSSHeight,PixelRatio".)
152
- --ad-block (Block some types of display ads after page loads.)
153
- --settings-file=FILE (Override default SeleniumBase settings.)
154
- --env=ENV (Set the test env. Access with "self.env" in tests.)
155
- --data=DATA (Extra test data. Access with "self.data" in tests.)
156
- --disable-csp (Disable the Content Security Policy of websites.)
157
- --remote-debug (Sync to Ch-R-Debugger chrome://inspect/#devices)
158
- --server=SERVER (The Selenium Grid server/IP used for tests.)
159
- --port=PORT (The Selenium Grid port used by the test server.)
160
- --proxy=SERVER:PORT (Connect to a proxy server:port for tests.)
161
- --proxy=USER:PASS@SERVER:PORT (Use authenticated proxy server.)
162
-
163
- For the full list of command-line options, type: "pytest --help".
164
- ```
165
-
166
- <h3>behave-options</h3>
167
-
168
- * Usage:
169
-
170
- ```bash
171
- sbase behave-options
172
- ```
173
-
174
- * Output:
175
-
176
- Displays common Behave command-line options
177
- that are available when using SeleniumBase.
178
-
179
- ```bash
180
- -D browser=BROWSER (The web browser to use. Default is "chrome")
181
- -D headless (Run tests headlessly. Default mode on Linux OS.)
182
- -D demo (Slow down and visually see test actions as they occur.)
183
- -D slow (Slow down the automation. Faster than using Demo Mode.)
184
- -D reuse-session / -D rs (Reuse browser session between tests.)
185
- -D crumbs (Clear all cookies between tests reusing a session.)
186
- -D maximize (Start tests with the web browser window maximized.)
187
- -D dashboard (Enable SeleniumBase\'s Dashboard at dashboard.html)
188
- -D incognito (Enable Chromium\'s Incognito Mode.)
189
- -D guest (Enable Chromium\'s Guest Mode.)
190
- -D dark (Enable Chromium\'s Dark Mode.)
191
- -D uc (Use undetected-chromedriver to evade detection.)
192
- --no-snippets / -q (Quiet mode. Don\'t print snippets.)
193
- --dry-run / -d (Dry run. Only show discovered tests.)
194
- --stop (Stop running tests after the first failure is reached.)
195
- -D pdb (Enter the Post Mortem Debug Mode after any test fails.)
196
- | Debug Mode Commands >>> help / h: List all commands. |
197
- | n: Next line of method. s: Step through. c: Continue. |
198
- | return / r: Run until method returns. j: Jump to line. |
199
- | where / w: Show stack spot. u: Up stack. d: Down stack. |
200
- | longlist / ll: See code. dir(): List namespace objects. |
201
- -D recorder (Record browser actions to generate test scripts.)
202
- -D rec-print (Display recorded scripts when they are created.)
203
- -D save-screenshot (Save a screenshot at the end of each test.)
204
- -D archive-logs (Archive old log files instead of deleting them.)
205
- -D check-js (Check for JavaScript errors after page loads.)
206
- -D start-page=URL (The browser start page when tests begin.)
207
- -D agent=STRING (Modify the web browser\'s User-Agent string.)
208
- -D mobile (Use Chromium\'s mobile device emulator during tests.)
209
- -D metrics=STRING (Set mobile "CSSWidth,CSSHeight,PixelRatio".)
210
- -D ad-block (Block some types of display ads after page loads.)
211
- -D settings-file=FILE (Override default SeleniumBase settings.)
212
- -D env=ENV (Set the test env. Access with "self.env" in tests.)
213
- -D data=DATA (Extra test data. Access with "self.data" in tests.)
214
- -D disable-csp (Disable the Content Security Policy of websites.)
215
- -D remote-debug (Sync to Ch-R-Debugger chrome://inspect/#devices)
216
- -D server=SERVER (The Selenium Grid server/IP used for tests.)
217
- -D port=PORT (The Selenium Grid port used by the test server.)
218
- -D proxy=SERVER:PORT (Connect to a proxy server:port for tests.)
219
- -D proxy=USER:PASS@SERVER:PORT (Use authenticated proxy server.)
220
-
221
- For the full list of command-line options, type: "behave --help".
222
- ```
223
-
224
- <h3>gui / commander</h3>
225
-
226
- * Usage:
227
-
228
- ```bash
229
- sbase gui [OPTIONAL PATH or TEST FILE]
230
- sbase commander [OPTIONAL PATH or TEST FILE]
231
- ```
232
-
233
- <h3>behave-gui</h3>
234
-
235
- * Usage:
236
-
237
- ```bash
238
- sbase behave-gui [OPTIONAL PATH or TEST FILE]
239
- sbase gui-behave [OPTIONAL PATH or TEST FILE]
240
- ```
241
-
242
- * Examples:
243
-
244
- ```bash
245
- sbase behave-gui
246
- sbase behave-gui -i=calculator
247
- sbase behave-gui features/
248
- sbase behave-gui features/calculator.feature
249
- ```
250
-
251
- * Output:
252
-
253
- Launches SeleniumBase Commander / GUI for Behave.
254
-
255
- <h3>caseplans</h3>
256
-
257
- * Usage:
258
-
259
- ```bash
260
- sbase caseplans [OPTIONAL PATH or TEST FILE]
261
- ```
262
-
263
- * Examples:
264
-
265
- ```bash
266
- sbase caseplans
267
- sbase caseplans -k agent
268
- sbase caseplans -m marker2
269
- sbase caseplans test_suite.py
270
- sbase caseplans offline_examples/
271
- ```
272
-
273
- * Output:
274
-
275
- Launches the SeleniumBase Case Plans Generator.
276
-
277
- <h3>mkdir</h3>
278
-
279
- * Usage:
280
-
281
- ```bash
282
- sbase mkdir [DIRECTORY] [OPTIONS]
283
- ```
284
-
285
- * Example:
286
-
287
- ```bash
288
- sbase mkdir ui_tests
289
- ```
290
-
291
- * Options:
292
-
293
- ``-b`` / ``--basic`` (Only config files. No tests added.)
294
-
295
- * Output:
296
-
297
- Creates a new folder for running SBase scripts.
298
- The new folder contains default config files,
299
- sample tests for helping new users get started,
300
- and Python boilerplates for setting up customized
301
- test frameworks.
302
-
303
- ```bash
304
- ui_tests/
305
- ├── __init__.py
306
- ├── my_first_test.py
307
- ├── parameterized_test.py
308
- ├── pytest.ini
309
- ├── requirements.txt
310
- ├── setup.cfg
311
- ├── test_demo_site.py
312
- └── boilerplates/
313
- ├── __init__.py
314
- ├── base_test_case.py
315
- ├── boilerplate_test.py
316
- ├── classic_obj_test.py
317
- ├── page_objects.py
318
- ├── sb_fixture_test.py
319
- └── samples/
320
- ├── __init__.py
321
- ├── google_objects.py
322
- ├── google_test.py
323
- ├── sb_swag_test.py
324
- └── swag_labs_test.py
325
- ```
326
-
327
- If running with the ``-b`` or ``--basic`` option:
328
-
329
- ```bash
330
- ui_tests/
331
- ├── __init__.py
332
- ├── pytest.ini
333
- ├── requirements.txt
334
- └── setup.cfg
335
- ```
336
-
337
- <h3>mkfile</h3>
338
-
339
- * Usage:
340
-
341
- ```bash
342
- sbase mkfile [FILE.py] [OPTIONS]
343
- ```
344
-
345
- * Example:
346
-
347
- ```bash
348
- sbase mkfile new_test.py
349
- ```
350
-
351
- * Options:
352
-
353
- `-b` / `--basic` (Basic boilerplate / single-line test)
354
- `-r` / `--rec` (adds Pdb+ breakpoint for Recorder Mode)
355
- ``--url=URL`` (makes the test start on a specific page)
356
-
357
- * Language Options:
358
-
359
- ``--en`` / ``--English`` | ``--zh`` / ``--Chinese``
360
- ``--nl`` / ``--Dutch`` | ``--fr`` / ``--French``
361
- ``--it`` / ``--Italian`` | ``--ja`` / ``--Japanese``
362
- ``--ko`` / ``--Korean`` | ``--pt`` / ``--Portuguese``
363
- ``--ru`` / ``--Russian`` | ``--es`` / ``--Spanish``
364
-
365
- * Syntax Formats:
366
-
367
- ``--bc`` / ``--basecase`` (BaseCase class inheritance)
368
- ``--pf`` / ``--pytest-fixture`` (sb pytest fixture)
369
- ``--cf`` / ``--class-fixture`` (class + sb pytest fixture)
370
- ``--cm`` / ``--context-manager`` (SB context manager)
371
- ``--dc`` / ``--driver-context`` (DriverContext manager)
372
- ``--dm`` / ``--driver-manager`` (Driver manager)
373
-
374
- * Output:
375
-
376
- Creates a new SBase test file with boilerplate code.
377
- If the file already exists, an error is raised.
378
- By default, uses English with BaseCase inheritance,
379
- and creates a boilerplate with common SeleniumBase
380
- methods: "open", "type", "click", "assert_element",
381
- and "assert_text". If using the basic boilerplate
382
- option, only the "open" method is included. Only the
383
- BaseCase format supports Languages or Recorder Mode.
384
-
385
- <h3>mkrec / record / codegen</h3>
386
-
387
- * Usage:
388
-
389
- ```bash
390
- sbase mkrec [FILE.py] [OPTIONS]
391
- sbase codegen [FILE.py] [OPTIONS]
392
- ```
393
-
394
- * Examples:
395
-
396
- ```bash
397
- sbase mkrec new_test.py
398
- sbase mkrec new_test.py --url=seleniumbase.io
399
- sbase codegen new_test.py
400
- sbase codegen new_test.py --url=wikipedia.org
401
- ```
402
-
403
- * Options:
404
-
405
- ``--url=URL`` (Sets the initial start page URL.)
406
- ``--edge`` (Use Edge browser instead of Chrome.)
407
- ``--gui`` / ``--headed`` (Use headed mode on Linux.)
408
- ``--uc`` / ``--undetected`` (Use undetectable mode.)
409
- ``--overwrite`` (Overwrite file when it exists.)
410
- ``--behave`` (Also output Behave/Gherkin files.)
411
-
412
- * Output:
413
-
414
- Creates a new SeleniumBase test using the Recorder.
415
- If the filename already exists, an error is raised.
416
-
417
- <h3>recorder</h3>
418
-
419
- * Usage:
420
-
421
- ```bash
422
- sbase recorder [OPTIONS]
423
- ```
424
-
425
- * Options:
426
-
427
- ``--uc`` / ``--undetected`` (Use undetectable mode.)
428
- ``--behave`` (Also output Behave/Gherkin files.)
429
-
430
- * Output:
431
-
432
- Launches the SeleniumBase Recorder Desktop App.
433
-
434
- <h3>mkpres</h3>
435
-
436
- * Usage:
437
-
438
- ```bash
439
- sbase mkpres [FILE.py] [LANG]
440
- ```
441
-
442
- * Example:
443
-
444
- ```bash
445
- sbase mkpres new_presentation.py --en
446
- ```
447
-
448
- * Language Options:
449
-
450
- ``--en`` / ``--English`` | ``--zh`` / ``--Chinese``
451
- ``--nl`` / ``--Dutch`` | ``--fr`` / ``--French``
452
- ``--it`` / ``--Italian`` | ``--ja`` / ``--Japanese``
453
- ``--ko`` / ``--Korean`` | ``--pt`` / ``--Portuguese``
454
- ``--ru`` / ``--Russian`` | ``--es`` / ``--Spanish``
455
-
456
- * Output:
457
-
458
- Creates a new presentation with 3 example slides.
459
- If the file already exists, an error is raised.
460
- By default, the slides are written in English,
461
- and use "serif" theme with "slide" transition.
462
- The slides can be used as a basic boilerplate.
463
-
464
- <h3>mkchart</h3>
465
-
466
- * Usage:
467
-
468
- ```bash
469
- sbase mkchart [FILE.py] [LANG]
470
- ```
471
-
472
- * Example:
473
-
474
- ```bash
475
- sbase mkchart new_chart.py --en
476
- ```
477
-
478
- * Language Options:
479
-
480
- ``--en`` / ``--English`` | ``--zh`` / ``--Chinese``
481
- ``--nl`` / ``--Dutch`` | ``--fr`` / ``--French``
482
- ``--it`` / ``--Italian`` | ``--ja`` / ``--Japanese``
483
- ``--ko`` / ``--Korean`` | ``--pt`` / ``--Portuguese``
484
- ``--ru`` / ``--Russian`` | ``--es`` / ``--Spanish``
485
-
486
- * Output:
487
-
488
- Creates a new SeleniumBase chart presentation.
489
- If the file already exists, an error is raised.
490
- By default, the slides are written in English,
491
- and use a "sky" theme with "slide" transition.
492
- The chart can be used as a basic boilerplate.
493
-
494
- <h3>print</h3>
495
-
496
- * Usage:
497
-
498
- ```bash
499
- sbase print [FILE] [OPTIONS]
500
- ```
501
-
502
- * Options:
503
-
504
- ``-n`` (Add line Numbers to the rows)
505
-
506
- * Output:
507
-
508
- Prints the code/text of any file
509
- with syntax-highlighting.
510
-
511
- <h3>translate</h3>
512
-
513
- * Usage:
514
-
515
- ```bash
516
- sbase translate [SB_FILE.py] [LANGUAGE] [ACTION]
517
- ```
518
-
519
- * Languages:
520
-
521
- ``--en`` / ``--English`` | ``--zh`` / ``--Chinese``
522
- ``--nl`` / ``--Dutch`` | ``--fr`` / ``--French``
523
- ``--it`` / ``--Italian`` | ``--ja`` / ``--Japanese``
524
- ``--ko`` / ``--Korean`` | ``--pt`` / ``--Portuguese``
525
- ``--ru`` / ``--Russian`` | ``--es`` / ``--Spanish``
526
-
527
- * Actions:
528
-
529
- ``-p`` / ``--print`` (Print translation output to the screen)
530
- ``-o`` / ``--overwrite`` (Overwrite the file being translated)
531
- ``-c`` / ``--copy`` (Copy the translation to a new ``.py`` file)
532
-
533
- * Options:
534
-
535
- ``-n`` (include line Numbers when using the Print action)
536
-
537
- * Output:
538
-
539
- Translates a SeleniumBase Python file into the language
540
- specified. Method calls and "import" lines get swapped.
541
- Both a language and an action must be specified.
542
- The ``-p`` action can be paired with one other action.
543
- When running with ``-c`` (or ``--copy``), the new file name
544
- will be the original name appended with an underscore
545
- plus the 2-letter language code of the new language.
546
- (Example: Translating "test_1.py" into Japanese with
547
- ``-c`` will create a new file called "test_1_ja.py".)
548
-
549
- <h3>extract-objects</h3>
550
-
551
- * Usage:
552
-
553
- ```bash
554
- sbase extract-objects [SB_FILE.py]
555
- ```
556
-
557
- * Output:
558
-
559
- Creates page objects based on selectors found in a
560
- seleniumbase Python file and saves those objects to the
561
- "page_objects.py" file in the same folder as the tests.
562
-
563
- <h3>inject-objects</h3>
564
-
565
- * Usage:
566
-
567
- ```bash
568
- sbase inject-objects [SB_FILE.py] [OPTIONS]
569
- ```
570
-
571
- * Options:
572
-
573
- ``-c``, ``--comments`` (Add object selectors to the comments.)
574
-
575
- * Output:
576
-
577
- Takes the page objects found in the "page_objects.py"
578
- file and uses those to replace matching selectors in
579
- the selected seleniumbase Python file.
580
-
581
- <h3>objectify</h3>
582
-
583
- * Usage:
584
-
585
- ```bash
586
- sbase objectify [SB_FILE.py] [OPTIONS]
587
- ```
588
-
589
- * Options:
590
-
591
- ``-c``, ``--comments`` (Add object selectors to the comments.)
592
-
593
- * Output:
594
-
595
- A modified version of the file where the selectors
596
- have been replaced with variable names defined in
597
- "page_objects.py", supporting the Page Object Pattern.
598
- (This has the same outcome as combining
599
- ``extract-objects`` with ``inject-objects``)
600
-
601
- <h3>revert-objects</h3>
602
-
603
- * Usage:
604
-
605
- ```bash
606
- sbase revert-objects [SB_FILE.py] [OPTIONS]
607
- ```
608
-
609
- * Options:
610
-
611
- ``-c``, ``--comments`` (Keep existing comments for the lines.)
612
-
613
- * Output:
614
-
615
- Reverts the changes made by ``seleniumbase objectify ...`` or
616
- ``seleniumbase inject-objects ...`` when run against a
617
- seleniumbase Python file. Objects will get replaced by
618
- selectors stored in the "page_objects.py" file.
619
-
620
- <h3>convert</h3>
621
-
622
- * Usage:
623
-
624
- ```bash
625
- sbase convert [WEBDRIVER_UNITTEST_FILE.py]
626
- ```
627
-
628
- * Output:
629
-
630
- Converts a Selenium IDE exported WebDriver unittest
631
- file into a SeleniumBase file. Adds ``_SB`` to the
632
- new filename while keeping the original file intact.
633
- Works on both Selenium IDE & Katalon Recorder scripts.
634
-
635
- <h3>encrypt / obfuscate</h3>
636
-
637
- * Usage:
638
-
639
- ``sbase encrypt`` OR ``sbase obfuscate``
640
-
641
- * Output:
642
-
643
- Runs the password encryption/obfuscation tool.
644
- (Where you can enter a password to encrypt/obfuscate.)
645
-
646
- <h3>decrypt / unobfuscate</h3>
647
-
648
- * Usage:
649
-
650
- ``sbase decrypt`` OR ``sbase unobfuscate``
651
-
652
- * Output:
653
-
654
- Runs the password decryption/unobfuscation tool.
655
- (Where you can enter an encrypted password to decrypt.)
656
-
657
- <h3>proxy</h3>
658
-
659
- * Usage:
660
-
661
- ```bash
662
- sbase proxy [OPTIONS]
663
- ```
664
-
665
- * Options:
666
-
667
- ``--hostname=HOSTNAME`` (Set ``hostname``) (Default: ``127.0.0.1``)
668
- ``--port=PORT`` (Set ``port``) (Default: ``8899``)
669
- ``--help`` / ``-h`` (Display list of all available ``proxy`` options.)
670
-
671
- * Output:
672
-
673
- Launch a basic proxy server on the current machine.
674
- (Uses ``127.0.0.1:8899`` as the default address.)
675
-
676
- <h3>download</h3>
677
-
678
- * Usage:
679
-
680
- ```bash
681
- sbase download server
682
- ```
683
-
684
- * Output:
685
-
686
- Downloads the Selenium Server JAR file for Grid usage.
687
- (That JAR file is required when using a Selenium Grid)
688
-
689
- <h3>grid-hub</h3>
690
-
691
- * Usage:
692
-
693
- ```bash
694
- sbase grid-hub {start|stop|restart} [OPTIONS]
695
- ```
696
-
697
- * Options:
698
-
699
- ``-v``, ``--verbose`` (Increases verbosity of logging output.)
700
- ``--timeout=TIMEOUT`` (Close idle browser windows after TIMEOUT seconds.)
701
-
702
- * Output:
703
-
704
- Controls the Selenium Grid Hub server, which allows
705
- for running tests on multiple machines in parallel
706
- to speed up test runs and reduce the total time
707
- of test suite execution.
708
- You can start, restart, or stop the Grid Hub server.
709
-
710
- <h3>grid-node</h3>
711
-
712
- * Usage:
713
-
714
- ```bash
715
- sbase grid-node {start|stop|restart} [OPTIONS]
716
- ```
717
-
718
- * Options:
719
-
720
- ``--hub=HUB_IP`` (The Grid Hub IP Address to connect to.) (Default: ``127.0.0.1``)
721
- ``-v``, ``--verbose`` (Increases verbosity of logging output.)
722
-
723
- * Output:
724
-
725
- Controls the Selenium Grid node, which serves as a
726
- worker machine for your Selenium Grid Hub server.
727
- You can start, restart, or stop the Grid node.
728
-
729
- --------
730
-
731
- [<img src="https://seleniumbase.github.io/cdn/img/super_logo_sb.png" title="SeleniumBase" width="290">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)