# Macro records Drag Not Click

**URL:** <https://forums.distill.io/t/macro-records-drag-not-click/2535>\
**Category:** Uncategorized\
**Tags:** macros\
**Created:** [September 21, 2023, 2:28pm UTC](https://forums.distill.io/t/macro-records-drag-not-click/2535 "2023-09-21T14:28:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alextaxanalysts](https://forums.distill.io/letter_avatar_proxy/v4/letter/a/898d66/32.png) [@alextaxanalysts](https://forums.distill.io/u/alextaxanalysts)\
**Post date:** [September 21, 2023, 2:28pm UTC](https://forums.distill.io/t/macro-records-drag-not-click/2535/1 "2023-09-21T14:28:31Z")

</div>

I recorded a Macro for the following website

[https://jurisprudencia.sedetc.gob.pe/sistematizacion-jurisprudencial/avanzado/](https://jurisprudencia.sedetc.gob.pe/sistematizacion-jurisprudencial/avanzado/)

[Peru Constitutional Court - OCDE-40c40350-5887-11ee-aee4-9709bca02770.json](https://forums.distill.io/uploads/short-url/6oct2CcuTqTUnWtZr7SGW5UZpzL.json) (906 Bytes)

Somehow, it only recorded “drag”. When I went in the recorder again, I could add click.

However, for the same website with different keywords, it is not working, I don’t know why.

[Peruvian Constitutional Court - Keyword Precios de Transferencia-751348f9-5889-11ee-aeeb-f3755adcdb61.json](https://forums.distill.io/uploads/short-url/gQLklqnM7TKwiPRHMNS3rBhfe6W.json) (818 Bytes)

---

<div class="post-metadata">

**Author:** ![cobramonk](https://forums.distill.io/user_avatar/forums.distill.io/cobramonk/32/353_2.png) [@cobramonk](https://forums.distill.io/u/cobramonk)\
**Post date:** [September 22, 2023, 8:07am UTC](https://forums.distill.io/t/macro-records-drag-not-click/2535/2 "2023-09-22T08:07:51Z")

</div>

Hi Alex,

The second macro has `drag` and not `click` step. We should replace the `drag` step with a `click` step.

1. Open the macro recorderd.
2. Click on the title of the `drag` step in the Sidebar.
3. A searchable dropdown will appear with a list of Step types with which you can replace the current step.
4. Choose `Click` option. Your `drag` step will be replaced with a `click` step.

The above steps will replace the `drag` step with a `click` step.  
Now, we have to update the `selector` in the `click` step, so that the correct element in the page gets clicked.

1. In the click step, by default the selector value is set to `html`. You can see that it is the first item in the second row of `click` step.
2. Click on the value `html`. This will let you interactively select the element from the page.
3. Click on the `button` with value “REALIZAR LA BUSQUEDA”.
4. Click “Enter” key on your keyboard.

The above steps will updated the `selector` of the `click` step to select the appropriate element.  
You can now save and replay the macro and it should work correctly.

If you find it hard to replicate the above steps, please import and use the corrected macro that is attached below:

[Peruvian Constitutional Court - Keyword Precios de Transferencia-ba988d38-591b-11ee-8e36-839e3378b7b4.json](https://forums.distill.io/uploads/short-url/huTFIXlI2YMW7LWuDPU2rdnaN1m.json) (706 Bytes)

---

<div class="post-metadata">

**Author:** ![alextaxanalysts](https://forums.distill.io/letter_avatar_proxy/v4/letter/a/898d66/32.png) [@alextaxanalysts](https://forums.distill.io/u/alextaxanalysts)\
**Post date:** [September 27, 2023, 12:41pm UTC](https://forums.distill.io/t/macro-records-drag-not-click/2535/3 "2023-09-27T12:41:30Z")

</div>

Ok, thanks. It worked with your recorded macro.
