Skip to content

Commit 628d7ec

Browse files
committed
Optimize Recorder Mode
1 parent 8864da6 commit 628d7ec

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

seleniumbase/extensions/recorder.zip

-9 Bytes
Binary file not shown.

seleniumbase/js_code/recorder_js.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,8 @@
4040
!el.getAttribute(attr).includes('\n'))
4141
{
4242
the_attr = el.getAttribute(attr);
43-
if (the_attr.includes('"'))
44-
the_attr = the_attr.replace('"', '\\"');
45-
if (the_attr.includes("'"))
46-
the_attr = the_attr.replace("'", "\\'");
43+
the_attr = the_attr.replaceAll('"', '\\"');
44+
the_attr = the_attr.replaceAll("'", "\\'");
4745
selector += '[' + attr + '="' + the_attr + '"]';
4846
path.unshift(selector);
4947
break;
@@ -163,6 +161,7 @@
163161
non_id_attributes.push('for');
164162
non_id_attributes.push('placeholder');
165163
non_id_attributes.push('value');
164+
non_id_attributes.push('ng-click');
166165
non_id_attributes.push('ng-if');
167166
non_id_attributes.push('src');
168167
selector_by_attr = [];

0 commit comments

Comments
 (0)