We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f36d8f4 commit 5296b5bCopy full SHA for 5296b5b
py/selenium/webdriver/remote/webelement.py
@@ -33,6 +33,11 @@
33
except NameError:
34
pass
35
36
+try:
37
+ from base64 import encodebytes
38
+except ImportError: # 3+
39
+ from base64 import encodestring as encodebytes
40
+
41
try:
42
from StringIO import StringIO as IOStream
43
except ImportError: # 3+
@@ -735,7 +740,7 @@ def _upload(self, filename):
735
740
zipped = zipfile.ZipFile(fp, 'w', zipfile.ZIP_DEFLATED)
736
741
zipped.write(filename, os.path.split(filename)[1])
737
742
zipped.close()
738
- content = base64.encodestring(fp.getvalue())
743
+ content = encodebytes(fp.getvalue())
739
744
if not isinstance(content, str):
745
content = content.decode('utf-8')
746
0 commit comments