seleniumbase 4.30.8__py3-none-any.whl → 4.31.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. sbase/__init__.py +1 -0
  2. seleniumbase/__init__.py +2 -3
  3. seleniumbase/__version__.py +1 -1
  4. seleniumbase/behave/behave_sb.py +47 -9
  5. seleniumbase/config/settings.py +4 -0
  6. seleniumbase/console_scripts/sb_behave_gui.py +5 -5
  7. seleniumbase/console_scripts/sb_caseplans.py +6 -6
  8. seleniumbase/console_scripts/sb_commander.py +5 -5
  9. seleniumbase/console_scripts/sb_install.py +10 -2
  10. seleniumbase/console_scripts/sb_recorder.py +4 -4
  11. seleniumbase/core/browser_launcher.py +138 -103
  12. seleniumbase/core/mysql.py +1 -4
  13. seleniumbase/core/recorder_helper.py +24 -5
  14. seleniumbase/core/sb_driver.py +2 -3
  15. seleniumbase/core/settings_parser.py +4 -0
  16. seleniumbase/fixtures/base_case.py +307 -492
  17. seleniumbase/fixtures/js_utils.py +19 -52
  18. seleniumbase/fixtures/page_actions.py +3 -6
  19. seleniumbase/fixtures/page_utils.py +20 -58
  20. seleniumbase/plugins/base_plugin.py +2 -3
  21. seleniumbase/plugins/driver_manager.py +169 -3
  22. seleniumbase/plugins/pytest_plugin.py +34 -21
  23. seleniumbase/plugins/sb_manager.py +170 -3
  24. seleniumbase/plugins/selenium_plugin.py +52 -6
  25. seleniumbase/undetected/__init__.py +13 -38
  26. seleniumbase/undetected/dprocess.py +4 -6
  27. seleniumbase/undetected/options.py +3 -6
  28. seleniumbase/undetected/patcher.py +2 -3
  29. {seleniumbase-4.30.8.dist-info → seleniumbase-4.31.0.dist-info}/METADATA +108 -123
  30. {seleniumbase-4.30.8.dist-info → seleniumbase-4.31.0.dist-info}/RECORD +34 -45
  31. {seleniumbase-4.30.8.dist-info → seleniumbase-4.31.0.dist-info}/WHEEL +1 -1
  32. sbase/ReadMe.txt +0 -2
  33. seleniumbase/ReadMe.md +0 -25
  34. seleniumbase/common/ReadMe.md +0 -71
  35. seleniumbase/console_scripts/ReadMe.md +0 -734
  36. seleniumbase/drivers/ReadMe.md +0 -27
  37. seleniumbase/extensions/ReadMe.md +0 -12
  38. seleniumbase/masterqa/ReadMe.md +0 -61
  39. seleniumbase/resources/ReadMe.md +0 -31
  40. seleniumbase/resources/favicon.ico +0 -0
  41. seleniumbase/utilities/selenium_grid/ReadMe.md +0 -84
  42. seleniumbase/utilities/selenium_ide/ReadMe.md +0 -111
  43. {seleniumbase-4.30.8.dist-info → seleniumbase-4.31.0.dist-info}/LICENSE +0 -0
  44. {seleniumbase-4.30.8.dist-info → seleniumbase-4.31.0.dist-info}/entry_points.txt +0 -0
  45. {seleniumbase-4.30.8.dist-info → seleniumbase-4.31.0.dist-info}/top_level.txt +0 -0
@@ -1,734 +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
- ``--uc`` (UC Mode boilerplate using SB context manager)
354
- `-b` / `--basic` (Basic boilerplate / single-line test)
355
- `-r` / `--rec` (Adds Pdb+ breakpoint for Recorder Mode)
356
- ``--url=URL`` (Makes the test start on a specific page)
357
-
358
- * Language Options:
359
-
360
- ``--en`` / ``--English`` | ``--zh`` / ``--Chinese``
361
- ``--nl`` / ``--Dutch`` | ``--fr`` / ``--French``
362
- ``--it`` / ``--Italian`` | ``--ja`` / ``--Japanese``
363
- ``--ko`` / ``--Korean`` | ``--pt`` / ``--Portuguese``
364
- ``--ru`` / ``--Russian`` | ``--es`` / ``--Spanish``
365
-
366
- * Syntax Formats:
367
-
368
- ``--bc`` / ``--basecase`` (BaseCase class inheritance)
369
- ``--pf`` / ``--pytest-fixture`` (sb pytest fixture)
370
- ``--cf`` / ``--class-fixture`` (class + sb pytest fixture)
371
- ``--cm`` / ``--context-manager`` (SB context manager)
372
- ``--dc`` / ``--driver-context`` (DriverContext manager)
373
- ``--dm`` / ``--driver-manager`` (Driver manager)
374
-
375
- * Output:
376
-
377
- Creates a new SBase test file with boilerplate code.
378
- If the file already exists, an error is raised.
379
- By default, uses English with BaseCase inheritance,
380
- and creates a boilerplate with common SeleniumBase
381
- methods: "open", "type", "click", "assert_element",
382
- and "assert_text". If using the basic boilerplate
383
- option, only the "open" method is included. Only the
384
- BaseCase format supports Languages or Recorder Mode.
385
- UC Mode automatically uses English with SB() format.
386
-
387
- <h3>mkrec / record / codegen</h3>
388
-
389
- * Usage:
390
-
391
- ```bash
392
- sbase mkrec [FILE.py] [OPTIONS]
393
- sbase codegen [FILE.py] [OPTIONS]
394
- ```
395
-
396
- * Examples:
397
-
398
- ```bash
399
- sbase mkrec new_test.py
400
- sbase mkrec new_test.py --url=seleniumbase.io
401
- sbase codegen new_test.py
402
- sbase codegen new_test.py --url=wikipedia.org
403
- ```
404
-
405
- * Options:
406
-
407
- ``--url=URL`` (Sets the initial start page URL.)
408
- ``--edge`` (Use Edge browser instead of Chrome.)
409
- ``--gui`` / ``--headed`` (Use headed mode on Linux.)
410
- ``--uc`` / ``--undetected`` (Use undetectable mode.)
411
- ``--ee`` (Use SHIFT + ESC to end the recording.)
412
- ``--overwrite`` (Overwrite file when it exists.)
413
- ``--behave`` (Also output Behave/Gherkin files.)
414
-
415
- * Output:
416
-
417
- Creates a new SeleniumBase test using the Recorder.
418
- If the filename already exists, an error is raised.
419
-
420
- <h3>recorder</h3>
421
-
422
- * Usage:
423
-
424
- ```bash
425
- sbase recorder [OPTIONS]
426
- ```
427
-
428
- * Options:
429
-
430
- ``--uc`` / ``--undetected`` (Use undetectable mode.)
431
- ``--behave`` (Also output Behave/Gherkin files.)
432
-
433
- * Output:
434
-
435
- Launches the SeleniumBase Recorder Desktop App.
436
-
437
- <h3>mkpres</h3>
438
-
439
- * Usage:
440
-
441
- ```bash
442
- sbase mkpres [FILE.py] [LANG]
443
- ```
444
-
445
- * Example:
446
-
447
- ```bash
448
- sbase mkpres new_presentation.py --en
449
- ```
450
-
451
- * Language Options:
452
-
453
- ``--en`` / ``--English`` | ``--zh`` / ``--Chinese``
454
- ``--nl`` / ``--Dutch`` | ``--fr`` / ``--French``
455
- ``--it`` / ``--Italian`` | ``--ja`` / ``--Japanese``
456
- ``--ko`` / ``--Korean`` | ``--pt`` / ``--Portuguese``
457
- ``--ru`` / ``--Russian`` | ``--es`` / ``--Spanish``
458
-
459
- * Output:
460
-
461
- Creates a new presentation with 3 example slides.
462
- If the file already exists, an error is raised.
463
- By default, the slides are written in English,
464
- and use "serif" theme with "slide" transition.
465
- The slides can be used as a basic boilerplate.
466
-
467
- <h3>mkchart</h3>
468
-
469
- * Usage:
470
-
471
- ```bash
472
- sbase mkchart [FILE.py] [LANG]
473
- ```
474
-
475
- * Example:
476
-
477
- ```bash
478
- sbase mkchart new_chart.py --en
479
- ```
480
-
481
- * Language Options:
482
-
483
- ``--en`` / ``--English`` | ``--zh`` / ``--Chinese``
484
- ``--nl`` / ``--Dutch`` | ``--fr`` / ``--French``
485
- ``--it`` / ``--Italian`` | ``--ja`` / ``--Japanese``
486
- ``--ko`` / ``--Korean`` | ``--pt`` / ``--Portuguese``
487
- ``--ru`` / ``--Russian`` | ``--es`` / ``--Spanish``
488
-
489
- * Output:
490
-
491
- Creates a new SeleniumBase chart presentation.
492
- If the file already exists, an error is raised.
493
- By default, the slides are written in English,
494
- and use a "sky" theme with "slide" transition.
495
- The chart can be used as a basic boilerplate.
496
-
497
- <h3>print</h3>
498
-
499
- * Usage:
500
-
501
- ```bash
502
- sbase print [FILE] [OPTIONS]
503
- ```
504
-
505
- * Options:
506
-
507
- ``-n`` (Add line Numbers to the rows)
508
-
509
- * Output:
510
-
511
- Prints the code/text of any file
512
- with syntax-highlighting.
513
-
514
- <h3>translate</h3>
515
-
516
- * Usage:
517
-
518
- ```bash
519
- sbase translate [SB_FILE.py] [LANGUAGE] [ACTION]
520
- ```
521
-
522
- * Languages:
523
-
524
- ``--en`` / ``--English`` | ``--zh`` / ``--Chinese``
525
- ``--nl`` / ``--Dutch`` | ``--fr`` / ``--French``
526
- ``--it`` / ``--Italian`` | ``--ja`` / ``--Japanese``
527
- ``--ko`` / ``--Korean`` | ``--pt`` / ``--Portuguese``
528
- ``--ru`` / ``--Russian`` | ``--es`` / ``--Spanish``
529
-
530
- * Actions:
531
-
532
- ``-p`` / ``--print`` (Print translation output to the screen)
533
- ``-o`` / ``--overwrite`` (Overwrite the file being translated)
534
- ``-c`` / ``--copy`` (Copy the translation to a new ``.py`` file)
535
-
536
- * Options:
537
-
538
- ``-n`` (include line Numbers when using the Print action)
539
-
540
- * Output:
541
-
542
- Translates a SeleniumBase Python file into the language
543
- specified. Method calls and "import" lines get swapped.
544
- Both a language and an action must be specified.
545
- The ``-p`` action can be paired with one other action.
546
- When running with ``-c`` (or ``--copy``), the new file name
547
- will be the original name appended with an underscore
548
- plus the 2-letter language code of the new language.
549
- (Example: Translating "test_1.py" into Japanese with
550
- ``-c`` will create a new file called "test_1_ja.py".)
551
-
552
- <h3>extract-objects</h3>
553
-
554
- * Usage:
555
-
556
- ```bash
557
- sbase extract-objects [SB_FILE.py]
558
- ```
559
-
560
- * Output:
561
-
562
- Creates page objects based on selectors found in a
563
- seleniumbase Python file and saves those objects to the
564
- "page_objects.py" file in the same folder as the tests.
565
-
566
- <h3>inject-objects</h3>
567
-
568
- * Usage:
569
-
570
- ```bash
571
- sbase inject-objects [SB_FILE.py] [OPTIONS]
572
- ```
573
-
574
- * Options:
575
-
576
- ``-c``, ``--comments`` (Add object selectors to the comments.)
577
-
578
- * Output:
579
-
580
- Takes the page objects found in the "page_objects.py"
581
- file and uses those to replace matching selectors in
582
- the selected seleniumbase Python file.
583
-
584
- <h3>objectify</h3>
585
-
586
- * Usage:
587
-
588
- ```bash
589
- sbase objectify [SB_FILE.py] [OPTIONS]
590
- ```
591
-
592
- * Options:
593
-
594
- ``-c``, ``--comments`` (Add object selectors to the comments.)
595
-
596
- * Output:
597
-
598
- A modified version of the file where the selectors
599
- have been replaced with variable names defined in
600
- "page_objects.py", supporting the Page Object Pattern.
601
- (This has the same outcome as combining
602
- ``extract-objects`` with ``inject-objects``)
603
-
604
- <h3>revert-objects</h3>
605
-
606
- * Usage:
607
-
608
- ```bash
609
- sbase revert-objects [SB_FILE.py] [OPTIONS]
610
- ```
611
-
612
- * Options:
613
-
614
- ``-c``, ``--comments`` (Keep existing comments for the lines.)
615
-
616
- * Output:
617
-
618
- Reverts the changes made by ``seleniumbase objectify ...`` or
619
- ``seleniumbase inject-objects ...`` when run against a
620
- seleniumbase Python file. Objects will get replaced by
621
- selectors stored in the "page_objects.py" file.
622
-
623
- <h3>convert</h3>
624
-
625
- * Usage:
626
-
627
- ```bash
628
- sbase convert [WEBDRIVER_UNITTEST_FILE.py]
629
- ```
630
-
631
- * Output:
632
-
633
- Converts a Selenium IDE exported WebDriver unittest
634
- file into a SeleniumBase file. Adds ``_SB`` to the
635
- new filename while keeping the original file intact.
636
- Works on both Selenium IDE & Katalon Recorder scripts.
637
-
638
- <h3>encrypt / obfuscate</h3>
639
-
640
- * Usage:
641
-
642
- ``sbase encrypt`` OR ``sbase obfuscate``
643
-
644
- * Output:
645
-
646
- Runs the password encryption/obfuscation tool.
647
- (Where you can enter a password to encrypt/obfuscate.)
648
-
649
- <h3>decrypt / unobfuscate</h3>
650
-
651
- * Usage:
652
-
653
- ``sbase decrypt`` OR ``sbase unobfuscate``
654
-
655
- * Output:
656
-
657
- Runs the password decryption/unobfuscation tool.
658
- (Where you can enter an encrypted password to decrypt.)
659
-
660
- <h3>proxy</h3>
661
-
662
- * Usage:
663
-
664
- ```bash
665
- sbase proxy [OPTIONS]
666
- ```
667
-
668
- * Options:
669
-
670
- ``--hostname=HOSTNAME`` (Set ``hostname``) (Default: ``127.0.0.1``)
671
- ``--port=PORT`` (Set ``port``) (Default: ``8899``)
672
- ``--help`` / ``-h`` (Display list of all available ``proxy`` options.)
673
-
674
- * Output:
675
-
676
- Launch a basic proxy server on the current machine.
677
- (Uses ``127.0.0.1:8899`` as the default address.)
678
-
679
- <h3>download</h3>
680
-
681
- * Usage:
682
-
683
- ```bash
684
- sbase download server
685
- ```
686
-
687
- * Output:
688
-
689
- Downloads the Selenium Server JAR file for Grid usage.
690
- (That JAR file is required when using a Selenium Grid)
691
-
692
- <h3>grid-hub</h3>
693
-
694
- * Usage:
695
-
696
- ```bash
697
- sbase grid-hub {start|stop|restart} [OPTIONS]
698
- ```
699
-
700
- * Options:
701
-
702
- ``-v``, ``--verbose`` (Increases verbosity of logging output.)
703
- ``--timeout=TIMEOUT`` (Close idle browser windows after TIMEOUT seconds.)
704
-
705
- * Output:
706
-
707
- Controls the Selenium Grid Hub server, which allows
708
- for running tests on multiple machines in parallel
709
- to speed up test runs and reduce the total time
710
- of test suite execution.
711
- You can start, restart, or stop the Grid Hub server.
712
-
713
- <h3>grid-node</h3>
714
-
715
- * Usage:
716
-
717
- ```bash
718
- sbase grid-node {start|stop|restart} [OPTIONS]
719
- ```
720
-
721
- * Options:
722
-
723
- ``--hub=HUB_IP`` (The Grid Hub IP Address to connect to.) (Default: ``127.0.0.1``)
724
- ``-v``, ``--verbose`` (Increases verbosity of logging output.)
725
-
726
- * Output:
727
-
728
- Controls the Selenium Grid node, which serves as a
729
- worker machine for your Selenium Grid Hub server.
730
- You can start, restart, or stop the Grid node.
731
-
732
- --------
733
-
734
- [<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)