Replies: 1 comment 5 replies
-
You can achieve the same effect by using import hashlib
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)
class MyTest(BaseCase):
def sha256(self, text):
m = hashlib.sha256()
m.update(bytes(text, "utf8"))
return m.hexdigest()
def test_expose(self):
code = self.sha256("hello")
self.execute_script("window.code='%s';" % code)
print(self.execute_script("return window.code;")) If you just need to pass variables around, you can use standard Python for that. You can also save variables to |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, there is way to add function like
expose_function
, it in playwright ?Beta Was this translation helpful? Give feedback.
All reactions