Skip to content

Commit df603cf

Browse files
committed
Update the Selenium IDE export converter tool
1 parent 70c9501 commit df603cf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

seleniumbase/utilities/selenium_ide/convert_ide.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def main():
116116
if len(line.strip()) == 0:
117117
continue
118118

119-
# If .clear(), skip because .update_text() already does this
119+
# If .clear(), skip because self.type() already does this
120120
if line.strip().endswith(".clear()"):
121121
continue
122122

@@ -195,7 +195,7 @@ def main():
195195
if "\\[" in selector or "\\]" in selector or "\\." in selector:
196196
raw = "r"
197197
text = data.group(3)
198-
command = '''%sself.update_text(%s'%s', '%s')''' % (
198+
command = '''%sself.type(%s'%s', '%s')''' % (
199199
whitespace, raw, selector, text)
200200
seleniumbase_lines.append(command)
201201
continue
@@ -249,7 +249,7 @@ def main():
249249
whitespace = data.group(1)
250250
selector = '[name="%s"]' % data.group(2)
251251
text = data.group(3)
252-
command = '''%sself.update_text('%s', '%s')''' % (
252+
command = '''%sself.type('%s', '%s')''' % (
253253
whitespace, selector, text)
254254
seleniumbase_lines.append(command)
255255
continue
@@ -302,7 +302,7 @@ def main():
302302
whitespace = data.group(1)
303303
selector = '%s' % data.group(2)
304304
text = data.group(3)
305-
command = '''%sself.update_text('%s', '%s')''' % (
305+
command = '''%sself.type('%s', '%s')''' % (
306306
whitespace, selector, text)
307307
if command.count('\\"') == command.count('"'):
308308
command = command.replace('\\"', '"')
@@ -333,7 +333,7 @@ def main():
333333
whitespace = data.group(1)
334334
selector = '%s' % data.group(2)
335335
text = data.group(3)
336-
command = '''%sself.update_text("%s", '%s')''' % (
336+
command = '''%sself.type("%s", '%s')''' % (
337337
whitespace, selector, text)
338338
if command.count('\\"') == command.count('"'):
339339
command = command.replace('\\"', '"')
@@ -680,7 +680,7 @@ def main():
680680
data2 = re.match(regex_string, lines[line_num + 1])
681681
if data2:
682682
continue
683-
regex_string = (r'''^\s*self.update_text\(["|']'''
683+
regex_string = (r'''^\s*self.type\(["|']'''
684684
'' + selector + ''
685685
'' + r'''["|'], [\S\s]+\)\s*$''')
686686
data2 = re.match(regex_string, lines[line_num + 1])

0 commit comments

Comments
 (0)