feat: use addTextStep
This commit is contained in:
@@ -48,7 +48,7 @@ export const BrowserWindow = () => {
|
|||||||
const { socket } = useSocketStore();
|
const { socket } = useSocketStore();
|
||||||
const { width, height } = useBrowserDimensionsStore();
|
const { width, height } = useBrowserDimensionsStore();
|
||||||
const { getText } = useActionContext();
|
const { getText } = useActionContext();
|
||||||
const { addBrowserStep } = useBrowserSteps();
|
const { addTextStep } = useBrowserSteps();
|
||||||
|
|
||||||
const onMouseMove = (e: MouseEvent) => {
|
const onMouseMove = (e: MouseEvent) => {
|
||||||
if (canvasRef && canvasRef.current && highlighterData) {
|
if (canvasRef && canvasRef.current && highlighterData) {
|
||||||
@@ -121,7 +121,7 @@ export const BrowserWindow = () => {
|
|||||||
});
|
});
|
||||||
setShowAttributeModal(true);
|
setShowAttributeModal(true);
|
||||||
} else {
|
} else {
|
||||||
addBrowserStep('', highlighterData.elementInfo?.innerText || '', {
|
addTextStep('', highlighterData.elementInfo?.innerText || '', {
|
||||||
selector: highlighterData.selector,
|
selector: highlighterData.selector,
|
||||||
tag: highlighterData.elementInfo?.tagName,
|
tag: highlighterData.elementInfo?.tagName,
|
||||||
attribute: 'innerText'
|
attribute: 'innerText'
|
||||||
@@ -147,7 +147,7 @@ export const BrowserWindow = () => {
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
if (getText === true) {
|
if (getText === true) {
|
||||||
addBrowserStep('', data, {
|
addTextStep('', data, {
|
||||||
selector: selectedElement.selector,
|
selector: selectedElement.selector,
|
||||||
tag: selectedElement.info?.tagName,
|
tag: selectedElement.info?.tagName,
|
||||||
attribute: attribute
|
attribute: attribute
|
||||||
|
|||||||
Reference in New Issue
Block a user