File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
seleniumbase/utilities/selenium_ide Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change
1
+ # -*- coding: utf-8 -*-
1
2
"""
2
3
Converts a Selenium IDE recording that was exported as a Python WebDriver
3
4
unittest file into SeleniumBase Python file.
@@ -50,7 +51,7 @@ def main():
50
51
uses_keys = False
51
52
uses_select = False
52
53
53
- f = open (webdriver_python_file , 'r' )
54
+ f = open (webdriver_python_file , 'r' , encoding = 'utf-8' )
54
55
all_code = f .read ()
55
56
f .close ()
56
57
if "def test_" not in all_code :
@@ -722,7 +723,7 @@ def main():
722
723
# Create SeleniumBase test file
723
724
base_file_name = webdriver_python_file .split ('.py' )[0 ]
724
725
converted_file_name = base_file_name + "_SB.py"
725
- out_file = codecs .open (converted_file_name , "w+" )
726
+ out_file = codecs .open (converted_file_name , "w+" , encoding = 'utf-8' )
726
727
out_file .writelines (seleniumbase_code )
727
728
out_file .close ()
728
729
print ('\n >>> [%s] was created from [%s]\n ' % (
You can’t perform that action at this time.
0 commit comments