@remcp/runtime 0.2.167 → 0.2.168
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
CHANGED
|
@@ -125,6 +125,9 @@ export const PAGE_FILL_FORM = `function(fields) {
|
|
|
125
125
|
}
|
|
126
126
|
const tag = el.tagName.toLowerCase();
|
|
127
127
|
if (!['input','textarea','select'].includes(tag)) throw new Error('Unsupported form field: ' + field.selector);
|
|
128
|
+
if (tag === 'input' && ['checkbox','radio'].includes(el.type) && typeof field.value !== 'boolean') {
|
|
129
|
+
throw new Error('Checkbox and radio fields require a boolean value: ' + field.selector);
|
|
130
|
+
}
|
|
128
131
|
if (tag === 'select' && !Array.from(el.options).some(option => option.value === String(field.value))) {
|
|
129
132
|
throw new Error('No matching select option: ' + field.selector);
|
|
130
133
|
}
|