You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For more advanced run commands, such as using a proxy server, see [../help_docs/customizing_test_runs.md](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md)
Copy file name to clipboardExpand all lines: seleniumbase/common/ReadMe.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@
9
9
* @rate_limited(max_per_second)
10
10
11
11
Example demonstrating a rate-limited printing functionality:
12
+
12
13
```python
13
14
import unittest
14
15
from seleniumbase import decorators
@@ -37,6 +38,7 @@ Often in your tests, you may need to login to a website to perform testing. This
37
38
* First, set your custom encryption/decryption key in your local clone of [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py). (If you modify the key later, you'll need to encrypt all your passwords again.)
38
39
39
40
* Next, use [obfuscate.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/common/obfuscate.py) to obfuscate/encrypt passwords into coded strings:
41
+
40
42
```bash
41
43
python obfuscate.py
42
44
@@ -48,14 +50,17 @@ Password: *********
48
50
Here is the obfuscated password:
49
51
$^*ENCRYPT=RXlYMSJWTz8HSwM=?&#$
50
52
```
53
+
51
54
(You can also use [unobfuscate.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/common/unobfuscate.py) to encrypt passwords without having them masked while typing them. Or you can use it to decrypt an obfuscated password.)
52
55
53
56
* Finally, in your tests you can now decrypt obfuscated passwords for use in login methods like this:
(You'll notice that encrypted strings have a common start token and end token. This is to help tell them apart from non-encrypted strings. You can customize these tokens in [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py). The current default setting is `$^*ENCRYPT=` for the start token and `?&#$` for the end token.)
60
65
61
66
See [decryption_test.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/decryption_test.py) for an example of decrypting encrypted passwords in tests.
0 commit comments