Skip to content

Commit 1eced53

Browse files
committed
Add a new example test
1 parent 1f59d72 commit 1eced53

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

examples/decryption_test.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
"""
2+
This test demonstrates the use of encryption/decryption.
3+
(Technically, obfuscation/unobfuscation.)
4+
"""
5+
6+
from seleniumbase import BaseCase
7+
from seleniumbase import encryption
8+
9+
10+
class MyTestClass(BaseCase):
11+
12+
def test_rate_limited_printing(self):
13+
self.open("https://www.saucedemo.com/")
14+
self.update_text("#user-name", "standard_user")
15+
16+
encrypted_password = "$^*ENCRYPT=S3BDTAdCWzMmKEY8Gjg=?&#$"
17+
print("Encrypted Password = %s" % encrypted_password)
18+
password = encryption.decrypt(encrypted_password)
19+
print("Password = %s" % password)
20+
self.update_text("#password", password)
21+
22+
self.click('input[type="submit"]')
23+
self.assert_text("Products", "div.product_label")
24+
self.assert_element("#inventory_container")

0 commit comments

Comments
 (0)