testaro 18.13.3 → 18.13.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/procs/getLocatorData.js +1 -1
- package/testaro/headEl.js +3 -1
package/package.json
CHANGED
package/procs/getLocatorData.js
CHANGED
|
@@ -19,7 +19,7 @@ exports.getLocatorData = async loc => {
|
|
|
19
19
|
const refLabelText = refLabel ? refLabel.textContent : '';
|
|
20
20
|
let labelsText = '';
|
|
21
21
|
if (tagName === 'INPUT') {
|
|
22
|
-
const labels = element.labels;
|
|
22
|
+
const labels = element.labels || [];
|
|
23
23
|
const labelTexts = [];
|
|
24
24
|
labels.forEach(label => {
|
|
25
25
|
labelTexts.push(label.textContent);
|
package/testaro/headEl.js
CHANGED
|
@@ -33,7 +33,9 @@ exports.reporter = async page => {
|
|
|
33
33
|
// Change any spacing character sequences in it to single spaces.
|
|
34
34
|
rawPage = rawPage.replace(/\s+/g, ' ');
|
|
35
35
|
// Delete everything in it except the head content.
|
|
36
|
-
rawPage = rawPage.replace(/^.*<head
|
|
36
|
+
rawPage = rawPage.replace(/^.*<head>|<\/head>.*$/g, '');
|
|
37
|
+
// Delete any scripts from it.
|
|
38
|
+
rawPage = rawPage.replace(/<script[ >].+?<\/script>/g, '');
|
|
37
39
|
// Get the tag names of the remaining elements.
|
|
38
40
|
const tags = rawPage.match(/<([a-z]+)/g);
|
|
39
41
|
const ucTagNames = tags.map(tag => tag.toUpperCase().slice(1));
|