feat: use strObj for selector & tag
This commit is contained in:
@@ -71,15 +71,16 @@ export const RightSidePanel = ({ pairForEdit }: RightSidePanelProps) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const createSettingsObject = useCallback(() => {
|
const createSettingsObject = useCallback(() => {
|
||||||
const settings: Record<string, string> = {};
|
const settings: Record<string, { selector: string; tag?: string; [key: string]: any }> = {};
|
||||||
browserSteps.forEach(step => {
|
browserSteps.forEach(step => {
|
||||||
if (step.label && step.selector) {
|
if (step.label && step.selectorObj && step.selectorObj.selector) {
|
||||||
settings[step.label] = step.selector;
|
settings[step.label] = step.selectorObj;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return settings;
|
return settings;
|
||||||
}, [browserSteps]);
|
}, [browserSteps]);
|
||||||
|
|
||||||
|
|
||||||
const stopCaptureAndEmitSettings = useCallback(() => {
|
const stopCaptureAndEmitSettings = useCallback(() => {
|
||||||
stopGetText();
|
stopGetText();
|
||||||
const settings = createSettingsObject();
|
const settings = createSettingsObject();
|
||||||
|
|||||||
Reference in New Issue
Block a user