Skip to content

Commit 5ec078a

Browse files
committed
Recorder: Don't generate selectors with attributes containing \n
1 parent 2913f31 commit 5ec078a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

seleniumbase/js_code/recorder_js.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@
3737
while (el !== null && el.nodeType === Node.ELEMENT_NODE) {
3838
var selector = el.nodeName.toLowerCase();
3939
if (el.hasAttribute(attr) &&
40-
el.getAttribute(attr).length > 0) {
40+
el.getAttribute(attr).length > 0 &&
41+
!el.getAttribute(attr).includes('\n'))
42+
{
4143
the_attr = el.getAttribute(attr);
4244
if (the_attr.includes('"'))
4345
the_attr = the_attr.replace('"', '\\"');

0 commit comments

Comments
 (0)