Skip to content

Commit bd8a5de

Browse files
committed
Make improvements to the Recorder
1 parent 1c76fd9 commit bd8a5de

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

seleniumbase/extensions/recorder.zip

21 Bytes
Binary file not shown.

seleniumbase/js_code/recorder_js.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
if (el.id) {
1212
elid = el.id;
1313
if (elid.includes(',') || elid.includes('.') ||
14-
elid.includes('(') || elid.includes(')'))
14+
elid.includes('(') || elid.includes(')') || hasNumber(elid[0]))
1515
return cssPathByAttribute(el, 'id');
1616
selector += '#' + elid;
1717
path.unshift(selector);
@@ -110,7 +110,7 @@
110110
return el.tagName.toLowerCase();
111111
};
112112
function turnIntoParentAsNeeded(el) {
113-
if (tagName(el) == 'span') {
113+
if (tagName(el) == 'span' || tagName(el) == 'i') {
114114
if (tagName(el.parentElement) == 'button') {
115115
el = el.parentElement;
116116
}
@@ -148,6 +148,7 @@
148148
non_id_attributes.push('data-action');
149149
non_id_attributes.push('data-target');
150150
non_id_attributes.push('data-content');
151+
non_id_attributes.push('data-tooltip');
151152
non_id_attributes.push('alt');
152153
non_id_attributes.push('title');
153154
non_id_attributes.push('heading');

0 commit comments

Comments
 (0)